Display customer data which is not in other table

Reply

Join Date: Jan 2008
Posts: 16
Reputation: BillyMako is an unknown quantity at this point 
Solved Threads: 0
BillyMako BillyMako is offline Offline
Newbie Poster

Display customer data which is not in other table

 
0
  #1
Dec 2nd, 2008
What i want to do is display all the customers data which is in the 'customers' table where their 'customers_id' is NOT IN the 'customers_id' field in the 'orders' table.

I hope i made sense!

Thanks,
Billy
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,175
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: Display customer data which is not in other table

 
0
  #2
Dec 2nd, 2008
That should be simple :-

  1. SELECT *
  2. FROM customers
  3. WHERE customers_id NOT IN (
  4. SELECT customers_id
  5. FROM orders
  6. )
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC