Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding a negatives results.
Message
 
 
To
09/08/2003 15:15:08
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00818608
Message ID:
00818616
Views:
20
Assuming that UserID field is PK in the parent table in FK in the chilad table
SELECT * FROM users ;
  WHERE UserID NOT IN ( SELECT UserID FROM transactions )
* or using correlated query
SELECT * FROM users us ;
  WHERE NOT EXISTS ( SELECT UserID FROM transactions tr ;
         WHERE tr.UserID = us.UserID )
>Greetings friends;
>
>I have two tables one it contains users and the other transactions for user.
>I need to develop a query whose result is the users that have not done any transaction.
>
>How do I make it.?
>
>Thanks a lot.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform