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)
 pleas help me with this DATA problem

Author  Topic 

xlgeng
Starting Member

2 Posts

Posted - 2004-03-18 : 23:21:19
Today is my first day to T-SQL.

when i type:

"SELECT * FROM ads WHERE expired >Getdate()" on my asp page, it works

but when i type:

"SELECT * FROM ads WHERE expired >= Dateadd("hh", +21, Getdate())" it doesn't!

I also tried "SELECT * FROM ads WHERE expired >= ' " & Dateadd("hh", +21, Getdate()) & " ' " etc...

Please help with this line, I just want to add 21 hours to the current time, then compare to the db.

Thanks
Jack

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2004-03-18 : 23:23:19
You don't need the "" around the hh part...

DavidM

"An Ugg Boot is a generic Australian term that has been in use for nearly 100 hundred years. Now some coporate wanker has trademarked it.. "
Go to Top of Page

xlgeng
Starting Member

2 Posts

Posted - 2004-03-18 : 23:33:10
ye! I spent whole afternoon to setup sql server and made connection work. it's alway hard get the 1st step, isn't it?

thank you!
Go to Top of Page
   

- Advertisement -