I'm trying to understand this function.
Someone wrote this piece of code and I would like to use to do something simular.
On a daily basis we read .txt files into our SQL database through SSIS.
The data that's going through is growing fast and takes a long time to process. (for example a year of data is read every day into the db)
I want to make a dayset so that we only read one single day into the DB on top of the existing data and not the whole year.
Someone wrote this peace of code:
Select * , ROW_NUMBER() OVER (PARTITION BY PK_Assignment ORDER BY DATE, TIME) as LineNbr
I was wondering what the Partition By statement means.
My guess was that you have to place the fields there that makes the record unique.
Can someone help me out with this because I read so many things on the internet and still I don't understand.
Also I don't have much experience with SQL, just the basics.