Showing posts with label looping. Show all posts
Showing posts with label looping. Show all posts

Friday, March 9, 2012

Problem looping through excel workbooks(sheets) in a excel file in ssis

Hi i am new to ssis and i am trying to transfer data from excel file with multiple workbooks(tables) to oledb destination......i followed the instructions given in msdn but they r vague and do not help in achieving the result pls help me...

Quote:

Originally Posted by ashwinkpes

Hi i am new to ssis and i am trying to transfer data from excel file with multiple workbooks(tables) to oledb destination......i followed the instructions given in msdn but they r vague and do not help in achieving the result pls help me...


Use a Variable to Set the property of the work sheet($1,$2,etc) and Create the package.

Change that variable to Ursheet 1, sheet 2, sheet 3 while executing it...|||Thanks Buddy(Anil) it worked...[:)]|||

Quote:

Originally Posted by ashwinkpes

Thanks Buddy(Anil) it worked...[:)]


Fine.you can post some alternatives if you have..

Problem looping DTS and BCP within a Stored procedure

All,

This is the scenerio

SP=Stored Procedure

I call SP1 which calls a DTS package.

DTS package calls SP2 and SP2 calls SP3 and SP 4 using an IF condition

SP3 has 3 BCP OUT commands after which it calls SP1 again

Now, the problem is that if I follow all the steps, then only 1 of the BCP command executes and the control exits out of SP3 and returns control to SP1.

If I ignore SP1 and DTS and run SP2 independently, then all BCP steps in SP3 are executed and control returns to SP2

I ma not sure if using DTS and BCP in SQL stored procedures might cause any problems

Appreciate your helpIt seems like your DTS is executing under a different security context than when you execute your SP3 from QA. Are you checking for errors after each BCP in your SP3? If you're calling your BCP using xp_cmdshell, - consider doing INSERT @.temp_tbl exec master.dbo.xp_cmdshell [....].