Hi All,
regarding to ROW_NUMBER(). If I have same values for part PARTITION and ORDER BY then How does "ROW_NUMBER()" decide which records will have result = 1 and result = 2?
Example of table
1. row ... col1 = abc, col2 = 1
2. row ... col1 = abc, col2 = 1
3. row ... col1 = xyz, col2 = 99
select <table>.* ROW_NUMBER() OVER(PARTITION BY col1 ORDER BY col2) from <table>
Expected result is
abc,1,1
abc,1,2
xyz,99,1
many thanks
Rene
Forums: