Menu

(Solved) : 61 Create Variables Hold Start End Date 62 Peclare Startdate Datetime 01 01 1998 63 Declar Q35750353 . . .

Help with sql error :

61 - Create variables to hold the start and end date 62 -peclare @startDate datetime :い01/01/1998 63 Declare @EndDate datetim

61 – Create variables to hold the start and end date 62 -peclare @startDate datetime :い01/01/1998 63 Declare @EndDate datetime ’01/01/1999 64 – Use a while loop to add dates to the table 65 Declare @DateInProcess datetime 66 Set DateInProcess @startDate 67 while @DateInProcess<@EndDate 68 Begin 69Add a row into the date dimension table for this date 70 SET IDENTITY_INSERT [dbo].DimDates oN 71 Insert Into [dbo]. [DimDates ] 72values 73 Cast(Convert (nvarchar(58), @DateInProcess, 112) as int) [Datekey] 74 75 76 DateName( weekday, @DateInProcess)+’, ‘ + Convert (nvarchar (100), @DateInProcess Left(Cast (Convert(nvarchar 18e), @DateInProcess, 112) as int), 6) — [Monthkey] DateName( MONTH, DateInProcess+ ear( DateInProcess) – [Yearkey] 78 Cast( Year eoateInProcess) as nvarchar 1ee) [YearName] 79 8e Add a day and loop again 81 Set @DateInProcess Dateadd(d, 1, @DateInProcess 82 End Messages Msg 206 Level 16, State 2, Line 71 Operand type clash:int is incompatible with date Show transcribed image text

Expert Answer


Answer to 61 Create Variables Hold Start End Date 62 Peclare Startdate Datetime 01 01 1998 63 Declar Q35750353 . . .

OR