SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 lookup
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

arkiboys
Flowing Fount of Yak Knowledge

1418 Posts

Posted - 05/01/2008 :  04:34:03  Show Profile  Reply with Quote
Hi,
I am transferring the xml data from an xml file into sql server table using ssis.
To avoid any duplicate import via this ssis package, I would like to first check if data exists in the sql server table for what is about to be imported. If so then delete the existing data and then import.

Question:
How do I get the field value say ID field from the file and then take this id and delete these from the table in sql server first.

Is this to do with lookup or is there an easier way to do this please?
thanks

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 05/01/2008 :  13:12:34  Show Profile  Reply with Quote
I think you need a exec sql task where you perform this delete. the id will passed as parameter to task.

http://technet.microsoft.com/en-us/library/ms141003.aspx
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000