garethh86
asked on
SQL Query inner join?
Hi there, need a query to fit the below, I have a similiar query where I've used inner joins but this requires 'where' from multiple tables.
Here it is in pseudo (kind of):
Select EventTitle, EventDateTime FROM dbo.Events Where Event ID=@EventID
Select CustID, FullTickets, HalfTickets, FreeTickets, MembersTickets, Price, PaymentMethod, StaffID, Notes, BookingID WHERE EventID=@EventID FROM dbo.Bookings
Select FirstName + ' ' + LastName As Name from dbo.customers WHERE CustID=@CustID (all CustID returned from above Bookings table query)
I need this all to be returned in one row though, hope it makes sense!
Thanks!
Here it is in pseudo (kind of):
Select EventTitle, EventDateTime FROM dbo.Events Where Event ID=@EventID
Select CustID, FullTickets, HalfTickets, FreeTickets, MembersTickets, Price, PaymentMethod, StaffID, Notes, BookingID WHERE EventID=@EventID FROM dbo.Bookings
Select FirstName + ' ' + LastName As Name from dbo.customers WHERE CustID=@CustID (all CustID returned from above Bookings table query)
I need this all to be returned in one row though, hope it makes sense!
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry about that....was doing too much at once and wasn't watching what I was typing.
Thanks,
Shawn
Thanks,
Shawn
ASKER