Last post Jun 18, 2018 11:41 AM by gani7787
Jun 12, 2018 01:08 PM|gani7787|LINK
I want to print sequentially in a column. my query displaying select,1,10,11,12,etc.
But, i want to display select,1,2,3,4,5,6,7,etc
how to do this...?
below is my SQL query.
Select ' Select ' Emplevel,'' EmpId Union
select EmpLevel, ISNULL(EmpId,'') EmpId
from tbl_Employee order by Emplevel
Jun 12, 2018 01:40 PM|limno|LINK
Select Emplevel, EmpId from (
Select ' Select ' Emplevel,'' EmpId
select Cast(EmpLevel as varchar(20)), ISNULL(EmpId,'') EmpId
from tbl_Employee ) t
order by Case when Emplevel=' Select ' then 0 else Cast(Emplevel as int) End
Jun 18, 2018 11:41 AM|gani7787|LINK
Thanks and Excellent...