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!

Who is Participating?
scgstuffConnect With a Mentor Commented:
Try this:

Select e.EventTitle, e.EventDateTime, b.CustID, b.FullTickets, b.HalfTickets, b.FreeTickets, b.MembersTickets, b.Price, b.PaymentMethod, b.StaffID, b.Notes, b.BookingID, c.FirstName + ' ' + c.LastName As Name  
FROM dbo.Events e inner join dbo.Bookings s on e.EventID = b.Event_ID
inner join dbo.customers on b.CustID = c.CustID
WHERE e.EventID=@EventID

garethh86Author Commented:
you got a couple of letters round the round way but i shuffled it round and it works! Thanks for the quick response! :)
Sorry about that....was doing too much at once and wasn't watching what I was typing.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.