By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,968 Members | 1,215 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,968 IT Pros & Developers. It's quick & easy.

Join Problems

P: 2
I have created a query with 2 tables, one is about student information and the other about there payments. I want to see payments for the students for a specific month - that I can do. But I don't know how to let the query show the student even if there is no record in the payments table. Pleas help
Oct 1 '08 #1
Share this Question
Share on Google+
2 Replies


P: 1
Expand|Select|Wrap|Line Numbers
  1. SELECT Student.StudentName, iif([payment].payment is null, 0, [payment].payment) as Payment from student left join payment on student.studentid = payment.studentid
  2.  
Oct 1 '08 #2

DonRayner
Expert 100+
P: 489
I have created a query with 2 tables, one is about student information and the other about there payments. I want to see payments for the students for a specific month - that I can do. But I don't know how to let the query show the student even if there is no record in the payments table. Pleas help
In the query design window, double click on the join line between the two tables. You will then get a window with (left and right table name), (left and right column name) and three option buttons. Option 1 will be selected. You need to select the button that basicly says "include all records from student information table and only thoes records from payments table where the records are equal"
Oct 1 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.