Let's say I have the code below in Reporting Services as a seperate Dataset
This would bring back
'D1'
'D10'
'D11'
'D12'
'D2'
'D3'
'D4'
'D5'
'D6'
'D7'
'D8'
'D9'
with what we have in our database now.
When I do a order by HomeLaborLevelName2 I need it to come back as
'D1'
'D2'
'D3'
'D4'
'D5'
'D6'
'D7'
'D8'
'D9'
'D10'
'D11'
'D12'
So the results would be in numeric order and not lexical order
Any Suggestions?
Code:
select distinct homelaborlevelname2
from vp_person
where homelaborlevelname2 >= 'D'
and homelaborlevelname2 <= 'E'
order by homelaborlevelname2
This would bring back
'D1'
'D10'
'D11'
'D12'
'D2'
'D3'
'D4'
'D5'
'D6'
'D7'
'D8'
'D9'
with what we have in our database now.
When I do a order by HomeLaborLevelName2 I need it to come back as
'D1'
'D2'
'D3'
'D4'
'D5'
'D6'
'D7'
'D8'
'D9'
'D10'
'D11'
'D12'
So the results would be in numeric order and not lexical order
Any Suggestions?