Results 1 to 3 of 3
Jan 20, 2005, 10:45 #1
- Join Date
- Jul 2004
- Hermosa Costa Rica
- 0 Post(s)
- 0 Thread(s)
Select for 2 tables - how to get all records.
I am asking for a list of records, here from my Consumer table. These people also have usernames stored in another table Users. I point back to these by the 2 AND statements below. This works great, the query below correctly pulls 4 records back that do have usernames. However, I am trying to build a list of ALL consumers, then display the Users.UserName field IF it exists there. So in other words, this query needs to be returning me 1000 records and displaying 4 of those with usernames.
I am sure its my sql logic here .. im getting better but its a long road
WHERE 0 = 0
AND Users.UserTableID = Consumer.ConsumerID
AND Users.UserTable = 'Consumer'
ORDER BY ConsumerID ASC