Sir
I need to display following that in GridView after adding spaces according the data length.
If the data length is 2 then add one space if four add 2 spaces, so on.
1
11
1101
1101001
1101001001
1101001001001
1101001001002
1101001001003
1101001001004
1101001001005
1101001001006
1101001001007
1101001002
1101001002001
1101001003
1101001004
1101001005
1101001006
1101001007
1101001008
1101001009
1101001010
1101001011
1101001012
1101002
1101002001
1102
1102001
1102001001
1102001002
1102001003
1102002
Select
AccountIDTree=Case When Len(AccountID)=2 then Char(32) + AccountID else
Case When Len(AccountID)=4 then Char(32)+Char(32)+ AccountID else
Case When Len(AccountID)=7 then Char(32)+Char(32)+Char(32)+ AccountID else
Case When Len(AccountID)=10 then Char(32)+Char(32)+Char(32)+Char(32)+ AccountID else
Case When Len(AccountID)=13 then Char(32)+Char(32)+Char(32)+Char(32)+Char(32)+ AccountID else
accountid end end end end end
from abc
Please help