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 |
ronnyr
Starting Member
21 Posts |
Posted - 2006-10-02 : 19:30:07
|
Hi All,I got an error with this query. The error is that I cannot using IS NOT IN like showing below. Is there any sql command that I can use to compare multiple result. Thanks.-----------------------------------------------------------------SELECT o.AccountID, o.InvoiceDTFROM [Order] o WHERE o.AccountID IS NOT IN (SELECT AccountID FROM [Order] WHERE InvoiceDT IS NOT NULL AND InvoiceDT > @PeriodToView ) AND o.InvoiceDT IS NOT NULL AND (o.InvoiceDT BETWEEN @PeriodToView - 90 AND @PeriodToView)GROUP BY o.AccountID, o.InvoiceDT----------------------------------------------------------------Ron.“Know where to find the information and how to use it - That's the secret of success” |
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2006-10-02 : 19:32:28
|
o.AccountID NOT IN (blah blah blah |
 |
|
ronnyr
Starting Member
21 Posts |
Posted - 2006-10-03 : 13:14:34
|
Thanks I got itRon.“Know where to find the information and how to use it - That's the secret of success” |
 |
|
|
|
|