Exforsys

Free Training

primary key

This is a discussion on primary key within the Java forums, part of the Programming Talk category; I add all data into database from csv file and just insert primary key which are auto generated and not ...

Go Back   Exforsys > Programming Talk > Java

Exforsys.com

  #1 (permalink)  
Old 04-15-2009, 04:20 AM
Junior Member
 
Join Date: Apr 2009
Posts: 2
Namarta is on a distinguished road
primary key

I add all data into database from csv file and just insert primary key which are auto generated and not in the csv file.how i will add primary key into table.


Help me
Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-15-2009, 08:38 AM
Senior Member
 
Join Date: Mar 2005
Posts: 916
techguru is on a distinguished road
you will need to load the csv to temp table, then load to the main table with identity assuing you are using sql server . if you are using oracle, then you need to create a sequence for this

another option is add a colimn in csv, put the sequence numbers before the load for the primary key
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Solaris x86 FAQ 1/2 Dan Anderson Tech FAQ 2 09-23-2008 04:15 AM
Primary in MVG sammy Siebel 1 06-16-2006 11:40 AM
Solaris x86 FAQ 2/2 Dan Anderson Tech FAQ 0 04-27-2004 08:24 PM
Quarterly ASCII posting of Caldera (SCO) OpenUNIX 8 FAQ Boyd Lynn Gerber Tech FAQ 0 04-25-2004 11:11 PM
Sybase FAQ: 1/19 - index David Owen Tech FAQ 2 04-20-2004 10:45 AM


All times are GMT -4. The time now is 03:42 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.