Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 151005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:22:51+00:00 2026-05-11T09:22:51+00:00

There are some tables that we want to do a search. I couldn’t understand

  • 0

There are some tables that we want to do a search.
I couldn’t understand why this error happens , please help.
I should be easy for experts,

SELECT * FROM passenger INNER JOIN [passenger-flylist] ppff  ON ppp.[passenger-id] = ppff.[passenger-id] 

the Error :

Msg 4104, Level 16, State 1, Line 1
The multi-part identifier ‘ppp.passenger-id’ could not be bound.

Tables are :

CREATE TABLE [dbo].[passenger](     [passenger-id] [int] IDENTITY(1,1) NOT NULL,     [name] [char](50) COLLATE Arabic_CI_AS NOT NULL,     [sex] [char](10) COLLATE Arabic_CI_AS NULL,     [mobile] [char](20) COLLATE Arabic_CI_AS NULL,     [address] [varchar](50) COLLATE Arabic_CI_AS NULL,     [flylist-id] [int] NOT NULL,     [chair-number] [char](10) COLLATE Arabic_CI_AS NOT NULL,     [Age] [char](10) COLLATE Arabic_CI_AS NULL,     [ticket-number] [char](10) COLLATE Arabic_CI_AS NULL,  CONSTRAINT [PK_passenger] PRIMARY KEY CLUSTERED  (     [passenger-id] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY]  GO 

Second

CREATE TABLE [dbo].[flylist](     [flylist-id] [int] IDENTITY(1,1) NOT NULL,     [fly-number] [varchar](50) COLLATE Arabic_CI_AS NOT NULL,     [go-date] [char](15) COLLATE Arabic_CI_AS NOT NULL,     [return-date] [char](15) COLLATE Arabic_CI_AS NOT NULL,     [go-time] [char](5) COLLATE Arabic_CI_AS NOT NULL,     [return-time] [char](5) COLLATE Arabic_CI_AS NOT NULL,     [start-from] [varchar](50) COLLATE Arabic_CI_AS NOT NULL,     [destination] [varchar](50) COLLATE Arabic_CI_AS NULL,     [airline-company-id] [int] NOT NULL,     [airplane-id] [int] NOT NULL,  CONSTRAINT [PK_flylist] PRIMARY KEY CLUSTERED  (     [flylist-id] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY]  GO 

Third

CREATE TABLE [dbo].[passenger-flylist](     [passenger-id] [int] NOT NULL,     [flylist-id] [int] NOT NULL,  CONSTRAINT [PK_passenger-flylist] PRIMARY KEY CLUSTERED  (     [passenger-id] ASC,     [flylist-id] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY]  GO USE [AirlineSx] GO ALTER TABLE [dbo].[passenger-flylist]  WITH CHECK ADD  CONSTRAINT [FK_passenger-flylist_passenger-flylist] FOREIGN KEY([passenger-id], [flylist-id]) REFERENCES [dbo].[passenger-flylist] ([passenger-id], [flylist-id]) 

If I had problem in setting the relations , please tell me how to do ,

thanks

Edited Part

Thanks , I found that in parallel with you , but I got another error : ( In my real code I want to get Passenger-id , but it doesn’t allow me )

SELECT [passenger-id] FROM passenger ppp -- <<<< This line INNER JOIN [passenger-flylist] ppff  ON ppp.[passenger-id] = ppff.[passenger-id] INNER JOIN flylist fff ON ppff.[flylist-id] = fff.[flylist-id] WHERE ppp.[name] = @name AND fff.[start-from] = @flightDate AND ppp.[ticket-number] = @ticketNo 

The Error is:

Msg 209, Level 16, State 1, Procedure SearchForPassenger, Line 19
Ambiguous column name ‘passenger-id’.

It refers to the 1st line that we want to select [passenger-id]

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:22:52+00:00Added an answer on May 11, 2026 at 9:22 am

    The problem is a missing alias ppp

    SELECT * FROM passenger ppp INNER JOIN [passenger-flylist] ppff  ON ppp.[passenger-id] = ppff.[passenger-id] 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That title is presumably awfully worded. I have some PostgreSQL tables. There is a
Is there an HTML parser or some library that automatically converts HTML tables into
There are some section in the table that does not contain any data and
I notice that there is some gap after my table. See the following snapshot:
Ok guys, just starting out with partitioning some tables in mySQL. There's a couple
so I am working on a few tables and there are some data inconsistency
I have two tables which have some transactional stuff stored in them. There will
I want to create search for one of my sqlite3 tables. With a combination
I want to search multi vars that could be true in WHERE condition or
I've got several tables that I want to merge for one big query. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.