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 |
|
vicki
Posting Yak Master
117 Posts |
Posted - 2001-10-10 : 13:11:53
|
| declare @weeknum int set @weeknum = 1 if convert(smalldatetime, run_dte) > '10010929' then @weeknum = datepart(wk,convert(smalldatetime,run_dte)) + 13 else datepart(wk,convert(datetime,Run_Dte)) + 13 as WeekNum, select DOC, Convert(smalldatetime,Run_Dte) as Run_Dte, datepart(wk,convert(datetime,Run_Dte)) + 13 as WeekNumwhat is the sysntax error here??Thanks |
|
|
|
|
|