Viewing 4 posts - 1 through 5 (of 5 total)
Fantastic - that is exactly what i´m searching for!
Many, many thank´s !!
March 13, 2011 at 1:09 pm
Sorry, but the result is not ok.
/*--results
1
1a
7a
9ce
12
45
78
x78
100
a458
*/
i need:
/*--results
1
1a
7a
9ce
12
45
78
100
a458
x78
*/
Start with number - sort alphabetical at the rest.
Thank you for your Help!
March 13, 2011 at 6:59 am
Ok sorry:
CREATE TABLE [dbo].[Numbers](
[nvarchar](20) NULL
) ON [PRIMARY]
GO
INSERT INTO Numbers values('a458'),('x78'),('1'),('12'),('45'),('7a'),('78'),('9ce'),('100'),('1a')
select * from Numbers order by case
when isnumeric(code )=1 then
convert(float,code )
else 99999999999
end,code
I´m searching for the result:
1
1a
7a
9ce
12
45
78
100
a458
x78
Many thx for...
March 11, 2011 at 11:09 am
Sorry, i forgot some additional informations. This query returns the result:
1
12
45
78
7a
9ce
a458
x78
March 11, 2011 at 12:12 am
Viewing 4 posts - 1 through 5 (of 5 total)