Click here to Skip to main content
15,881,898 members
Home / Discussions / Database
   

Database

 
AnswerRe: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER Pin
PIEBALDconsult17-Jul-14 13:39
mvePIEBALDconsult17-Jul-14 13:39 
QuestionExtract Data in Single Record Pin
mrfalk15-Jul-14 13:05
mrfalk15-Jul-14 13:05 
AnswerRe: Extract Data in Single Record Pin
data modeling guy15-Jul-14 19:32
data modeling guy15-Jul-14 19:32 
AnswerRe: Extract Data in Single Record Pin
Richard Deeming16-Jul-14 2:42
mveRichard Deeming16-Jul-14 2:42 
AnswerRe: Extract Data in Single Record Pin
PIEBALDconsult17-Jul-14 13:54
mvePIEBALDconsult17-Jul-14 13:54 
Questionlinked list using CTE Pin
Ali Al Omairi(Abu AlHassan)14-Jul-14 22:29
professionalAli Al Omairi(Abu AlHassan)14-Jul-14 22:29 
AnswerRe: linked list using CTE Pin
Ali Al Omairi(Abu AlHassan)14-Jul-14 23:14
professionalAli Al Omairi(Abu AlHassan)14-Jul-14 23:14 
QuestionOVER (PARTITION BY ORDER BY ) Pin
Ambertje14-Jul-14 4:44
Ambertje14-Jul-14 4:44 
Hello everyone,

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:

SQL
Select *     , ROW_NUMBER() OVER (PARTITION BY PK_Assignment ORDER BY DATE, TIME) as LineNbr
from ProductivityColliDagSet


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.

Ambertje
AnswerRe: OVER (PARTITION BY ORDER BY ) Pin
PIEBALDconsult14-Jul-14 5:13
mvePIEBALDconsult14-Jul-14 5:13 
GeneralRe: OVER (PARTITION BY ORDER BY ) Pin
Ambertje14-Jul-14 5:15
Ambertje14-Jul-14 5:15 
AnswerRe: OVER (PARTITION BY ORDER BY ) Pin
Eddy Vluggen14-Jul-14 5:27
professionalEddy Vluggen14-Jul-14 5:27 
GeneralRe: OVER (PARTITION BY ORDER BY ) Pin
PIEBALDconsult14-Jul-14 5:29
mvePIEBALDconsult14-Jul-14 5:29 
QuestionRe: OVER (PARTITION BY ORDER BY ) Pin
Eddy Vluggen14-Jul-14 7:47
professionalEddy Vluggen14-Jul-14 7:47 
AnswerRe: OVER (PARTITION BY ORDER BY ) Pin
Jörgen Andersson14-Jul-14 8:33
professionalJörgen Andersson14-Jul-14 8:33 
GeneralRe: OVER (PARTITION BY ORDER BY ) Pin
Mycroft Holmes14-Jul-14 12:54
professionalMycroft Holmes14-Jul-14 12:54 
GeneralRe: OVER (PARTITION BY ORDER BY ) Pin
Jörgen Andersson14-Jul-14 22:20
professionalJörgen Andersson14-Jul-14 22:20 
GeneralRe: OVER (PARTITION BY ORDER BY ) Pin
Ambertje14-Jul-14 22:12
Ambertje14-Jul-14 22:12 
AnswerRe: OVER (PARTITION BY ORDER BY ) Pin
jschell14-Jul-14 10:07
jschell14-Jul-14 10:07 
AnswerRe: OVER (PARTITION BY ORDER BY ) Pin
GuyThiebaut14-Jul-14 21:33
professionalGuyThiebaut14-Jul-14 21:33 
GeneralRe: OVER (PARTITION BY ORDER BY ) Pin
Ambertje14-Jul-14 22:13
Ambertje14-Jul-14 22:13 
QuestionError: Can't delete row or update row in SQL Server ? Pin
taibc11-Jul-14 18:29
taibc11-Jul-14 18:29 
AnswerRe: Error: Can't delete row or update row in SQL Server ? Pin
Mycroft Holmes11-Jul-14 23:32
professionalMycroft Holmes11-Jul-14 23:32 
GeneralRe: Error: Can't delete row or update row in SQL Server ? Pin
taibc13-Jul-14 20:36
taibc13-Jul-14 20:36 
GeneralRe: Error: Can't delete row or update row in SQL Server ? Pin
Mycroft Holmes13-Jul-14 21:06
professionalMycroft Holmes13-Jul-14 21:06 
AnswerRe: Error: Can't delete row or update row in SQL Server ? Pin
ZurdoDev14-Jul-14 10:14
professionalZurdoDev14-Jul-14 10:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.