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
 SQL Server Development (2000)
 select a row where todays date is between two dates in two different columns(from to) in a database.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-09-21 : 10:09:18
jernej writes "sql = "select anketa.* from anketa where cdate(anketa.from) <= '"&date&"' and cdate(anketa.to) > '"&date&"' "
------------------------------------------------------
for example
"anketa.from = 6.9.2001"
"anketa.to = 15.9.2001"
european date format
--------------------------
when i write this sql it only gets data from a database if todays date is under 10th day in the month."
   

- Advertisement -