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
 Other Forums
 MS Access
 Help with sql select script!!!

Author  Topic 

goomba79
Starting Member

1 Post

Posted - 2008-01-29 : 09:14:15
Hello!

i am trying to retrive enteries from my table that are 3 weeks old and have not been actioned!

my program is in vb.net connecting to an Access database.

my varible m_flag has been set to a date 3 weeks prior to the current date!

i'm not too sure how to write the sql command!!

i tried....

select * from complaints where raised <= m_flag

but it didnt work!

if anyone can help me it would be greatly appreciated!

thanks!!

Iain

georgev
Posting Yak Master

122 Posts

Posted - 2008-02-15 : 09:03:06
I think the problem is in your variable... It's hard to guess your method without you posting the whole script.

However, here's a stab.
[CODE]
SELECT *
FROM complaints
WHERE raised <= DateAdd(dd, -21, Now())
AND actioned = 0
[/CODE]


George
<3Engaged!
Go to Top of Page
   

- Advertisement -