Sasha,
What do you mean when you say the 'normal format'? A datetime column does
not have a format. If you mean that you're storing the dates as text
strings, why? This is definitely not recommended, especially given the
ambiguous format you posted... For instance, how will a user know what
1/2/2005 represents?
Assuming you're not storing dates as strings, this is probably easiest done
as a loop:
DECLARE @theDate SMALLDATETIME
SET @theDate = '20050101'
WHILE @theDate < '20060101'
BEGIN
INSERT YourTable (YourDateColumn)
VALUES (@theDate)
SET @theDate = DATEADD(dd, 1, @theDate)
END
If you are storing dates as strings, you can use CAST or CONVERT to get the
date into whatever string format you want... But please think about
converting to a SMALLDATETIME datatype.
[quoted text, click to view] "Sasha" <sashaqt@att.net> wrote in message
news:9f7401c486d1$9725f2f0$a401280a@phx.gbl...
> I have a schedule table and I need to add to the existing
> date column all dates for the year of 2005. The normal
> format 1/1/2005. To do it manually will take me forever,
> so what type of query can I use to do it.
>
> Thank you,
>
> Sasha