J
Jedi
Hi,
I have the following theoretical table:
Letter, Number
A, 1
A, 4
A, 3
A, 2
B, 3
B, 1
B, 4
B, 2
What I would like to do is create a SQL statement that gives me the info in
numerical order, but also with 4 always first
In pseudo terms:
select * from table1 order by 4, Number ASC
That will give me:
A, 4
A, 1
A, 2
A, 3
B, 4
B, 1
B, 2
B, 3
Is there any way of accomplishing this. I thought perhaps a union select,
but that puts all the 4's at the end, not at the beginning of each group.
Thanks,
Bodi
I have the following theoretical table:
Letter, Number
A, 1
A, 4
A, 3
A, 2
B, 3
B, 1
B, 4
B, 2
What I would like to do is create a SQL statement that gives me the info in
numerical order, but also with 4 always first
In pseudo terms:
select * from table1 order by 4, Number ASC
That will give me:
A, 4
A, 1
A, 2
A, 3
B, 4
B, 1
B, 2
B, 3
Is there any way of accomplishing this. I thought perhaps a union select,
but that puts all the 4's at the end, not at the beginning of each group.
Thanks,
Bodi