Link to home
Start Free TrialLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

csv file to sql server

I want to migrate all the data from a CSV file to a new table in SQL.  However, I want to migrate only the records that are new.  There is an ID column that is unique to each record in my CSV file.  How do I import my data from CSV to SQL each time?
Avatar of liranp1
liranp1
Flag of Israel image

hi

i don't know much about DB's but from what i know you need to transfer the CSV to XML and then import the XML to SQL DB.
Avatar of al4629740

ASKER

how do I transfer it to xml?
ASKER CERTIFIED SOLUTION
Avatar of kswathi
kswathi
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here is the simplest idea :
  insert all your data from CSV file into temp table, from that temp table you could select the data which match your terms than insert them into your real table.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK Create SSIS Package and use the Look for Check ID is available in Destination if not then insert else do nothing.