SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Can you please help me??


Can you please help me??

Author
Message
HanShi
HanShi
SSCrazy Eights
SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)SSCrazy Eights (8.6K reputation)

Group: General Forum Members
Points: 8600 Visits: 3718
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’! **
RandomEvent
RandomEvent
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 528
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.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)

Group: General Forum Members
Points: 214476 Visits: 41979
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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Sigerson
Sigerson
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1061 Visits: 1237
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search