set order to columns (1 Viewer)

abenitez77

Registered User.
Local time
Today, 09:28
Joined
Apr 29, 2010
Messages
141
I need to populate 2 columns :

1) Add a sequential record number (ClaimRow) that resets for each xlsfilename. This will contain the row number within the xlsfilename.

2) Add a sequential record number (TabRow) that resets for each xlsfilename, TabName. This will contain the row number within the TabName.

* See attachment of example
 

Attachments

  • NewOrders.jpg
    NewOrders.jpg
    105.7 KB · Views: 60

abenitez77

Registered User.
Local time
Today, 09:28
Joined
Apr 29, 2010
Messages
141
Thanks, It gave me an idea and I ran this query in Sql server and got my results I wanted.


Select ID, FullImagePath, TabName, xlsFileName, SheetOrder, Row_NUmber() Over(Partition By FullImagePath Order by FullImagePath, ID, SheetOrder ) as ClaimRow, Row_NUmber() Over(Partition By Fullimagepath, SheetOrder Order by FullImagePath, ID, SheetOrder ) as TabRow
FROM [AMAZON_COM_AUDIT_CLAIM_WORK].[dbo].[xlsData3]
Order by ID
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:28
Joined
Oct 29, 2018
Messages
21,467
Hi. Congratulations. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom