for example i exported student table with sno as (PK)
how to handle the upload twise (som of the records already in the data base )
1) How to ignore the existing records in the database
2) How to modify the records which is already exist in the database
1) EXCEL DATA SOURCE(STUDENT.XLS)
2) DATA CONVERSION
3) DESTINATION DATABASE (SQL SERVER 2005 STUDENT TABLE)
this is i have please tell me how to ignore/update the exisitng records
koti
It may be a good idea to load the excel data into a staging table first. This would give you a lot more flexibility than trying to run sql statements on the excel file.
To ignore duplicate records, you could then just do a look up from the staging table to the destination table and only load the rows that fail the lookup.
To update the records is a bit more tricky, as you have to use the OLE DB Command and write the SQL statement yourself.
Hope this helps,
Chris
|||
from the 1st page of this forum:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1211340&SiteID=1
No comments:
Post a Comment