Wednesday, July 31, 2013

Handy MsSQL Snippets

Force Items To Top Of Order By
ORDER BY
    CASE
        WHEN guide_item_text like '%condemnation%' then '1' + guide_item_text
ELSE '2' + guide_item_text
    END DESC

No comments:

Post a Comment