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 |
yumyum113
Starting Member
31 Posts |
Posted - 2007-03-02 : 19:53:29
|
Hi,Hope someone could help me in revising a long running query. Here is the queryselect *from table1where classid is nulland productid not in (select productidfrom table1where classid = 67)In here table1 could have several occurance of productid in which productid could have different classid. The possible values of classid are: NULL,1,2,3,67. Basically I am looking for all records whose classid is null but should never had an instance in table1 where its classid is 67.Do you have something like a "join" statment that will only include all records in the left table that is not in the right table?Hope someone could help me with this. Thanks in advance.-Ruel |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-03-02 : 20:07:07
|
This forum is not for questions. You should post this on a TSQL forum."Script LibraryThis section is for any originally written scripts you'd like to share with the group."CODO ERGO SUM |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
yumyum113
Starting Member
31 Posts |
Posted - 2007-03-03 : 22:45:53
|
How could I delete entire post?-Ruel |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-03-04 : 00:16:51
|
You can click on the DELETE thread icon but only before anybody else reply to that thread KH |
|
|
|
|
|