|
-
Jun 13th, 2002, 12:15 PM
#1
Thread Starter
Addicted Member
hmm... nadda with that. it returned everything when I know there should only be about 100 or so records returned.
-
Jun 13th, 2002, 12:22 PM
#2
Stuck in the 80s
Sorry. I've never tried to do something like this.
-
Jun 13th, 2002, 12:26 PM
#3
Fanatic Member
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?
-
Jun 13th, 2002, 12:40 PM
#4
Thread Starter
Addicted Member
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.
-
Jun 13th, 2002, 02:17 PM
#5
Stuck in the 80s
So...is this solved yet or no?
-
Jun 13th, 2002, 02:22 PM
#6
Fanatic Member
no. Im still thinking about how to do it using only mysql syntax
-
Jun 13th, 2002, 02:34 PM
#7
Stuck in the 80s
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|