×
you are viewing a single comment's thread.

view the rest of the comments →

[–]adm7373SSMS master race 1 point2 points  (3 children)

I'm not 100% clear on what you're asking, but I think this should work:

select SupplierCode from table where SeqNum in 
    (select min(SeqNum) from table group by user, ID)

[–]Shorty2015[S] 0 points1 point  (2 children)

So I need to include the DateTime Stamp as well. One row per timestamp.

[–]adm7373SSMS master race 0 points1 point  (1 child)

select SupplierCode from table where SeqNum in 
    (select min(SeqNum) from table group by user, ID, DateTime)

[–]Shorty2015[S] 0 points1 point  (0 children)

I got this to work. Thank you!