SELECT
run_dt,
seqnum,
ROW_NUMBER() OVER(PARTITION BY run_dt,seqnum ORDER BY run_dt, seqnum) new_sf_line_nbr
FROM ps_sf_acctg_ln
Sequential Numbers - SQL
Posted by
Michael Nitschke
on Wednesday, 17 August 2011
Labels:
SQL Sequence
This will creating a running sequence number for each unique combination of RUN_DT and SEQNUM; NEW_SF_LINE_NBR
0 comments:
Post a Comment