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.
| Author |
Topic |
|
Mannga
Yak Posting Veteran
70 Posts |
Posted - 2002-01-09 : 09:02:37
|
| Quick easy question here,I am creating a stored procedure that checks a database for records entered on certain weeks.The weeks are stored in the database as a integer[RecordName] [RecordsID] [Week]In my stored procedure I would like to be able to find out what week we are currently in. Is there any way to do this or must a look at a different way of doing things?Thanks,Gavin |
|
|
ToddV
Posting Yak Master
218 Posts |
Posted - 2002-01-09 : 09:19:07
|
| CHECK BOL For the datepart function.Select DATEPART(wk,getdate())You will want to make sure this agrees with the logic used populate the week column of the table |
 |
|
|
Mannga
Yak Posting Veteran
70 Posts |
Posted - 2002-01-09 : 10:33:24
|
That worked, BUT My logic was fatally flawed, at lesat I learned something new todayCheers,Gavin |
 |
|
|
|
|
|