March 10, 2011 at 6:01 pm
Hi All,
The task is to Extract data from 2 tables and then write to TABLE-A
then check TABLE-A if there are records then check against another Prod table and write to TABLE-B
Ok what I did so far is:
using source to extract Data and writing to TABLE-A
Next another source to extract records from TABLE-A and ProdTable >>>write to TABLE-B
but my question is how to check records in Table-A(or where to check) ?
do I need to use IF exists in SQL CMD or can I use ROWS ?
Please tell me in a simple way as I'm new with SSIS( or let me know if there is any good sample flow chart available on the net)
thanks all
Dave
March 10, 2011 at 11:03 pm
What are you checking for? Existance, a value in TableA being 'x', that it's new?
Need more information on what you're doing to help walk you through how to do it.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
March 11, 2011 at 12:29 am
Sounds like you might be looking for the SSIS equivalent of T-SQL MERGE, is that right?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
March 11, 2011 at 5:26 am
Before writing to the 2nd table, I need to check the records in the table-A
so if there are no records then EXIT else next step
thx
March 11, 2011 at 5:30 am
qew420 (3/11/2011)
Before writing to the 2nd table, I need to check the records in the table-Aso if there are no records then EXIT else next step
thx
Create an integer package variable.
Create an Execute SQL task that performs a SELECT COUNT() on table A and assigns the result to the variable created above.
Use precedence constraints to control what happens next, based on variable = 0, or not.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
March 11, 2011 at 8:52 am
Worked! thanks for the quick reply
I'll ask more questions if I'm stuck somewhere, thanks again
Dave
March 11, 2011 at 8:54 am
Great, thanks for posting back.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply