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 : 09:31:07
|
| Hi,I have the question and hope some one here can answer for me.The fiscal year is start at october so octobers is 1st month of the year.Right now I have 52 weeks in the database and what I want now is if from now onwhatever I update in the database then it become the week 1 not week 53ThanksCREATE Procedure InsertOPMISummaryasset datefirst 7beginDelete OPMISummaryinsert into OPMISummaryselect DOC, Convert(smalldatetime,Run_Dte) as Run_Dte,month(convert(smalldatetime, run_dte))<1o begin datepart(wk,convert(datetime,Run_Dte)) + 13 as WeekNum,endelsebegindatepart(wk,convert(datetime, run_dte))-39 as weeknumend |
|
|
|
|
|