Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

check for rows in oracle source query before truncate sql destination table

$
0
0

Hi,

I am working on optimizing a package where it has following steps in seqence:

  • truncate table sqlTable 
  • DFT : oracle attinuity source query from sql command followed by ole db destination to load sqlTable 

The reason why i optimize is in above case we simply first truncate the SQL table and then when source query has no rows returned for some reason,we are left with no data in SQL table and model/reports break.This is not a good design.

So i want to do the following in ssis :

  1. check oracle query and see if it returns any rows.Pls remember we use attinuity tool
  2. If Step 1 returns rows,then proceed to Step 3
  3. Truncate SQL table
  4. Load the SQL table from Oracle query

Viewing all articles
Browse latest Browse all 24688

Trending Articles