![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Need help on a query within DTS job. Trying to retrieve data from database based on the current server date. Any suggestions on how I can query/retrieve using the server's date as a condition? Ex. Select * from table1 where dateopen = ? dateopen = field column field entry = 10/01/06 |
#2
| |||
| |||
|
|
Hello Mike, Are you looking for this Select * from table1 where dateopen = Getdate() Getdate() though is very specific so maybe this is too granular. If the data in the colu,m is datetime and is held with only a date and a midnight time portion then you are probably wanting something like Select * from table1 where dateopen = CAST(CONVERT(CHAR(8),getdate(),112) AS DATETIME) Have a look in BOL for the other conversion codes for CONVERT() Regards Allan Mitchell Konesans Ltd T +44 7966 476 572 F +44 2071 008 479 http://www.konesans.com Need help on a query within DTS job. Trying to retrieve data from database based on the current server date. Any suggestions on how I can query/retrieve using the server's date as a condition? Ex. Select * from table1 where dateopen = ? dateopen = field column field entry = 10/01/06 |
![]() |
| Thread Tools | |
| Display Modes | |
| |