Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-07-02 : 11:09:27
|
Mauro writes "Hi,It's a little harder for to explain my doubt because i'm portuguese and i can't spell ou write very well.But my question is:I have two tables and i want to select all items from table T1 less some records from table T2T1: T2:--- ---city user city..... .... ....Lisbon mdfa PortoPorto nmdb LisbonCoimbra And i was expecting to achieve:Lisbon and Coimbra from T1, because i want all cities from T1 less teh cities in T2 where user=mdfa.Thx" |
|
|
M.E.
Aged Yak Warrior
539 Posts |
Posted - 2002-07-02 : 11:23:45
|
| subquery timeselect cityfrom t1where city not in (select city from t2 where user = 'mdfa')-----------------------Take my advice, I dare ya |
 |
|
|
|
|
|