SELECT DISTINCT Top 100 TicketNbr, DEX_ROW_ID FROM GP9SCLTD
And here is the Result:
TicketNbr DEX_ROW_ID --------- ----------- 001003 266733 001003 266734 001003 266735 001003 266736 001119 263586 001119 263591 001119 263587 001119 263592 001119 263588 001119 263593 001119 263589 001119 263594 001119 263590 001119 263595 006515 291589 006515 291593 006515 291590 006515 291594 006515 291591 006515 291595 006515 291592 006515 291596
What I want it to do is sort distinctly by TicketNbr and leave DEX_ROW_ID be. so the top result would look like this:
TicketNbr DEX_ROW_ID --------- ----------- 001003 266733 001119 263586 006515 291589
I NEEED to keep the DEX_ROW_ID in this for other purposes, and I can't have any duplicate TicketNbrs. Is there a way to do this in MsSql? MySql isn't an option in this.

New Topic/Question
Reply


MultiQuote




|