The following query...
SELECT ItemId, NoteSeqNum
FROM NotesTable
WHERE ItemId = 6434
AND NoteTypeId = 1
..returns these results:
ItemId NoteSeqNum
6434 11
6434 12
6434 13
I need SQL to return only those items with less than the max NoteSeqNum. So this would be my desired result:
ItemId NoteSeqNum
6434 11
6434 12
SELECT ItemId, NoteSeqNum
FROM NotesTable
WHERE ItemId = 6434
AND NoteTypeId = 1
..returns these results:
ItemId NoteSeqNum
6434 11
6434 12
6434 13
I need SQL to return only those items with less than the max NoteSeqNum. So this would be my desired result:
ItemId NoteSeqNum
6434 11
6434 12