SQLnewcommer
Technical User
Hello,
I am trying to create a date dimension. I have no idea where to start but I just gave it a try and came up with the following code.
I am going to put this in a while loop .
and I have declared @x as an int.
insert into Date_source values
dateadd('qq',1,'12/31/1999')
set @x = x + 1
But I am getting the following error:
Line 10: Incorrect syntax near 'dateadd'.
Any suggestions?
I am trying to create a date dimension. I have no idea where to start but I just gave it a try and came up with the following code.
I am going to put this in a while loop .
and I have declared @x as an int.
insert into Date_source values
dateadd('qq',1,'12/31/1999')
set @x = x + 1
But I am getting the following error:
Line 10: Incorrect syntax near 'dateadd'.
Any suggestions?