gentong.bocor (3/5/2015)
happycat59 (3/5/2015)
Try something likeselect
Field1
, Field2
, DENSE_RANK () OVER (ORDER BY Field1) AS SeqNo
FROM YourTable
yes.. it's get repeated seqno now based on field1, but it's sorted by field1.
it's not the normal order from source table
Quick note, there is no such thing as a default sort order, use the order by clause to set the order on retrieval.
😎