Re: auto lenght
- From: "Russell Fields" <russellfields@xxxxxxxxxx>
- Date: Thu, 1 May 2008 15:38:58 -0400
Muhammad,
SELECT @a = RIGHT(REPLICATE('0',7) + 'aaaa',7)
RLF
"Muhammad Bilal" <MuhammadBilal@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E5DFBAB7-AA1A-4CC0-A4F3-2ACB279D5682@xxxxxxxxxxxxxxxx
HI
Declare @a char(7)
if the lenght of the inserted value in @a is less than 7. the zero's
should
be added on the left side to make it of lenght 7.
set @a = aaaa
then 3 zero's should be added on the left side
As the lenght of @a may vary so how can zero's should be added on the left
side autometically to make it of lenght 7.
Regards...
.
- Next by Date: Re: Data Prompt
- Next by thread: Re: Data Prompt
- Index(es):