Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Can you please help me?? Expand / Collapse
Author
Message
Posted Thursday, August 29, 2013 6:58 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 2:34 PM
Points: 2,449, Visits: 2,990
I am certanly not a SSIS expert so I can't give you more details. Others on this forum might provide better help on that. But as far as I know you can create good conditional logic inside a SSIS package.
So instead of importing the CSV to a temp table and then analyse and process the lines you could try to analyse and proces the lines inside SSIS and then writing the results to the specific tables.


** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
Post #1489690
Posted Thursday, August 29, 2013 7:10 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 7:41 AM
Points: 519, Visits: 266
Why not add an extra column as specified earlier and then apply your logic to a case statement to populate the column.

You can then split the data out as required.

Or use SSIS and a conditional Split or milti-cast.
Post #1489697
Posted Thursday, August 29, 2013 9:34 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 8:19 PM
Points: 35,594, Visits: 32,189
Sigerson (8/29/2013)
Doing all of that within one SQL statement or a With block is beyond me,...


It's beyond me, too. But then again, I wouldn't even try to do it with a single statement. Avoiding the loop or doing something "set based" does NOT mean doing it "within one SQL statement or a Withblock". Multiple set-based passes will be much faster than using a loop for this.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1489992
Posted Thursday, September 5, 2013 9:43 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 11:53 AM
Points: 288, Visits: 831
Jeff Moden (8/29/2013)
Sigerson (8/29/2013)
Doing all of that within one SQL statement or a With block is beyond me,...


It's beyond me, too. But then again, I wouldn't even try to do it with a single statement. Avoiding the loop or doing something "set based" does NOT mean doing it "within one SQL statement or a Withblock". Multiple set-based passes will be much faster than using a loop for this.


I honestly don't understand what you mean by that. What would make it set-based? Is there an article I can chew on to get a grasp of this?

Thanks,


Sigerson

"No pressure, no diamonds." - Thomas Carlyle
Post #1491862
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse