Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.
select ...
from ...
order by case when RuleNumber like '%^[0-9.]%' then 1 else 0 end
, case when RuleNumber like '%^[0-9]%' then right('0000000000' + RuleNumber , 10) + '.00000'
when RuleNumber like '%^[0-9.]%' then right('0000000000' + substring(RuleNumber, charindex('.', RuleNumber)-1) , 10) + substring(RuleNumber, charindex('.', RuleNumber), 5) end
, RuleNumber
select ...
from ...
order by case when RuleNumber like '%^[0-9.]%' then 1 else 0 end
, case when RuleNumber like '%^[0-9]%' then right('0000000000' + RuleNumber , 10) + '.00000'
when RuleNumber like '%^[0-9.]%' then right('0000000000' + substring(RuleNumber, 1,charindex('.', RuleNumber)-1) , 10) + substring(RuleNumber, charindex('.', RuleNumber), 5) end
, RuleNumber
order by case when RuleNumber like '%[0-9.]%' then convert(float, RuleNumber) else null end,
case when Rulenumber like '%^[0-9.]%' then RuleNumber else null end
Open in new window