Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2012
    Posts
    6

    Simple query question

    Hello,

    the query below only returns 1 row - I need 2 rows. How does the query need to look like to display both bookings (b1.key#='030aae6e009a' and b1.key#='030aae6e008c') together with payment data?

    SELECT * FROM Booking b1, Payment p1
    WHERE (b1.key#='030aae6e009a' OR b1.key#='030aae6e008c')
    AND b1.key#=p1.key#


    Thank you!

  2. #2
    Join Date
    Dec 2008
    Location
    At work...
    Posts
    87
    Are you sure both tables have the expected data?


    Try
    SELECT * FROM Booking b1
    WHERE (b1.key#='030aae6e009a' OR b1.key#='030aae6e008c')


    and
    SELECT * FROM Payment p1
    WHERE (p1.key#='030aae6e009a' OR p1.key#='030aae6e008c')


    What do you get?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •