May 11, 2011 at 8:31 pm
Hi All,
I have a table , it stores the month value as 1;2;3;4 but i want to store instead of the number actual value like January;February;March;April like...
help me to write sql to fill the table..
thanks & Regards,
Anbu
May 11, 2011 at 8:57 pm
look up DATENAME() in BOL, that should do the trick. Is this just a reference table for the months of the year? If you're actually trying to store the months that something happened, you'll want to include more than just the month, so that come next January, you know which are 2011 and which are 2012.
---------------------------------------------------------
How best to post your question[/url]
How to post performance problems[/url]
Tally Table:What it is and how it replaces a loop[/url]
"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
May 11, 2011 at 9:06 pm
Hi ,
I want to pass the input as 1;2;3;4 then the function should convert like january;February:March;April like the output
Regards,
Anbu
May 12, 2011 at 7:44 am
Gotcha. So Anbu, what have you tried so far? Did you read the entry on Datename()? Do you have any questions about how to use it?
---------------------------------------------------------
How best to post your question[/url]
How to post performance problems[/url]
Tally Table:What it is and how it replaces a loop[/url]
"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply