alexanderthegreat
IS-IT--Management
I want to sort the result of this view, so that it sorts by eventdate first descending and where active = 1 then where active = 0 to follow
SELECT TOP 20 dbo.homepage.id, dbo.homepage.title, dbo.homepage.shortdescription, dbo.homepage.active, dbo.homepage.eventdate, dbo.homepage.image,
dbo.homepage.imagecaption, dbo.homecategories.id AS cid, dbo.homecategories.homecategories
FROM dbo.homecategories INNER JOIN
dbo.homepage ON dbo.homecategories.id = dbo.homepage.cid
WHERE (dbo.homecategories.id = 1)
ORDER BY dbo.homepage.eventdate DESC
SELECT TOP 20 dbo.homepage.id, dbo.homepage.title, dbo.homepage.shortdescription, dbo.homepage.active, dbo.homepage.eventdate, dbo.homepage.image,
dbo.homepage.imagecaption, dbo.homecategories.id AS cid, dbo.homecategories.homecategories
FROM dbo.homecategories INNER JOIN
dbo.homepage ON dbo.homecategories.id = dbo.homepage.cid
WHERE (dbo.homecategories.id = 1)
ORDER BY dbo.homepage.eventdate DESC