I have a query that returns the following information.
I need it to return only one row for each id field that meets the criteria, which should be the 2 rows(ids: 20,37).
QUERY:
----------------------------------------------
SELECT id, contentid, dateDisplayEnd
FROM dbo.tbl_menu_content
WHERE (dateDisplayEnd > GETDATE())
AND (contentQueueID = 2)
ORDER BY id, dateDisplayEnd
----------------------------------------------
RESULTS:
id contentid dateDisplayEnd
----------------------------------------------
20 100 8/21/2004 12:00:01 AM
20 102 8/21/2004 12:00:01 AM
20 103 8/21/2004 12:00:01 AM
20 104 8/21/2004 12:00:01 AM
20 108 8/21/2004 12:00:01 AM
20 119 8/31/2004 12:00:01 AM
37 106 8/24/2004 12:00:01 AM
----------------------------------------------
Thanks..
I need it to return only one row for each id field that meets the criteria, which should be the 2 rows(ids: 20,37).
QUERY:
----------------------------------------------
SELECT id, contentid, dateDisplayEnd
FROM dbo.tbl_menu_content
WHERE (dateDisplayEnd > GETDATE())
AND (contentQueueID = 2)
ORDER BY id, dateDisplayEnd
----------------------------------------------
RESULTS:
id contentid dateDisplayEnd
----------------------------------------------
20 100 8/21/2004 12:00:01 AM
20 102 8/21/2004 12:00:01 AM
20 103 8/21/2004 12:00:01 AM
20 104 8/21/2004 12:00:01 AM
20 108 8/21/2004 12:00:01 AM
20 119 8/31/2004 12:00:01 AM
37 106 8/24/2004 12:00:01 AM
----------------------------------------------
Thanks..