May 14, 2009 at 12:56 am
Hi
my table is like this
fig no
1
2
3
1a
2b
2c
1c
1b
11
12
this to be sort like this
1
1a
1b
1c
11
12
2
2b
2c
3
please any one give me the sql query for this?
Thanks
samba
May 14, 2009 at 2:34 am
Hi,
try this
create table #temp
(
figno varchar(3)
)
insert into #temp
select '1'
union all
select '2'
union all
select '3'
union all
select '1a'
union all
select '2b'
union all
select '2c'
union all
select '1c'
union all
select '11'
union all
select '12'
select * from #temp
select * from #temp
order by LEFT (figno,1)
ARUN SAS
May 14, 2009 at 10:09 pm
hi
What ever you are trying to say is correct if the rows are fixed.
that column is not fixed. it may have so many rows. and i want that to be sorted like folders sorting(means in if you sort folders my name in drive how it will show like this)
May 14, 2009 at 10:15 pm
iamsambu (5/14/2009)
and i want that to be sorted like folders sorting(means in if you sort folders my name in drive how it will show like this)
Hi,
you need sort in the SQl or in OS?
give some examples.
ARUN SAS
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply