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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 help with query please

Author  Topic 

cwfontan
Yak Posting Veteran

87 Posts

Posted - 2009-06-04 : 10:31:38
this is actually an access database.. but any help is appreciated..
I want to pull records from t that are not in t2 and for custID 13920 in between a set date and todays date



Select t.unitnumber as Tanknumber, t.CustID, t.indate, t.outdate, t.ctrlnum, t.inref
From tbl As t
WHERE NOT EXISTS
(SELECT *
FROM tbl2 as t2
WHERE tbltankinventory.unitnumber = t2.unitnum and t.ctrlnum = t2.ctrlnum)
AND t.CustID = '13920' AND t.indate IS Between #" 2/1/2009 & "# And #" & Today & "#)
order by unitnumber







SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-06-04 : 10:35:47
What is the problem?


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-06-04 : 10:35:55
you should post in the MS Access forum http://www.sqlteam.com/forums/forum.asp?FORUM_ID=3


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -