SELECT NavMenu.*
from NavMenu
left outer join navmenu as nm on navmenu.parentnavmenuid = nm.navmenuid
WHERE
NavMenu.NavMenuGroupCode IN (2609)
AND
NavMenu.NavMenuName LIKE '%test%'
order by navmenu.navmenugroupcode desc,
case when navmenu.isparentnavmenu = 1 then navmenu.listorder
Else nm.listorder
END ASC,
case when navmenu.isparentnavmenu = 1 then 0
else 1
END ASC,
NavMenu.ListOrder
End as 'GlobalOrder'
Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.
TRUSTED BY
Also I don't see 'GlobalOrder' in your posted solution, so hard to see how that worked for you.
Also as long as the name does not include spaces or punctuation marks other than underscore, the single quotes ' ' are not needed.