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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Using Array in Stored Procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-10 : 09:08:42
Rajesh writes "I need to create a procedure which takes date as a parameter
and spells it.

eg: 1-4-2001 should give First April two thousand one

The easiest way is the look up table technique wherein
an array with contents
first,second,....,thirty is created
and after using day(getdate()),I can just retrive (day-1)th
element from the array.
Unfortunately we dont have arrays in sql server & csv varchar approach that u suggested in earlier articles doesn't help me.

Could anyone help me with this???

Also the datename function spells just the month & the week-days
It doesn't spell the year & the date.So it is only partially useful if i need to spell the complete date.

Is there any inbuilt procedure which can help me with this???"
   

- Advertisement -