hmm... nadda with that. it returned everything when I know there should only be about 100 or so records returned.
Printable View
hmm... nadda with that. it returned everything when I know there should only be about 100 or so records returned.
Sorry. I've never tried to do something like this. :(
Okay, can you explain to me what data you are trying to pull? I have a feeling you are looking for data that is in the details table but their id is not in the customer table.
Is that correct?
yeah, the details has the information about a customers order (qty, item_num, etc) and links to the customer table with customer_ID. the customer table has all their shipping info. Now the guy before me messed up with his logic and would just delete orders by clearing them out of the customer table and not touching the details table. Make sense? So I'm doing some clean up and I want to clean out all those orders that are in the details table but not in the customer table. Kinda get where I'm at? I could do it in a PHP script but I know there's gotta be a way to do this in just SQL. At least to print out all the orders that are in details table and not customer table. It's kinda of a personal mission now... it could be done another way but I want to make this work.
So...is this solved yet or no? :confused:
no. Im still thinking about how to do it using only mysql syntax
Have you tried just:
SELECT * from details,customer WHERE details.customer_ID != (SELECT ID from customer);
We had a thread about that not too long ago.