Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Read a RAW file in Execute SQL Task

Author  Topic 

rojak9999
Starting Member

3 Posts

Posted - 2009-12-16 : 18:38:30
How to read a RAW file in Execute SQL Task?

I would like to use the MERGE statement with data source coming in as a RAW file.

svicky9
Posting Yak Master

232 Posts

Posted - 2010-01-17 : 05:51:20
If you want to exclusively use the merge statement import the Raw files in a staging table and then do the merge task

or the better way would be

Use the Dataflow task and get the Raw file as source and use Lookup and OLEDB command task to insert or update based on the value.
If the raw file is big , I recommend using the staging tables to populate the updated records and the new records and then update the destination table using
The OLE DB command is performance intensive. It executes a SQL update/insert for each record in the raw file.





http://www.sqlserver007.com
Go to Top of Page
   

- Advertisement -