on 03-17-2014 7:33 AM
How to make use of sequence when data is uploaded into table(column store) with the CSV file ?
There is a video that explains it quite clearly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As you can see in the video as well, He used "Load the data from local file" option to load to the staging table and then loaded the data with sequence number with Sequence as primary key.
The only difference with my approach is, I recommended using IMPORT command to load the data into stage table and then use a Stored Procedure to load data into Final table with sequence as primary key. Advantage here is this approach can be scheduled in the background and also automated
Regards,
Krishna Tangudu
Are you trying to generate a row number?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sharada,
You may have to follow the below steps:
1) To load the data from flat file to a Staging table using IMPORT command
2) You have to call the procedure to load the data further into final Table.
a) Have a look on this procedure to load data :
b) See my reply on the syntax on how to use "Sequence"
You will have to ensure that you frame your insert query in such a way to have the sequence number in the target table.
Regards,
Krishna Tangudu
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.