Wednesday, November 29, 2017

SQL Important Query

Select * from(
SELECT 0 as SORTCOLUMN, -1 AS [KEY], 'Select' AS [VALUE]
UNION all
SELECT 1 AS SORTCOLUMN, PARAMALLOWEDVALUEID AS [KEY], PARAMETERVALUE AS [VALUE]
FROM ICM_COMMPARAMALLOWDVALUE where PARAMETERID = 1 AND ISACTIVE = 1) tbl order by case when SORTCOLUMN=0 then 3 else 1 end,[value]

No comments:

Post a Comment