16,755 pts.
 Inserting a flat file into a temporary table
I need to take a flat file and insert it into a temporary table, then use that table to delete from another table all rows based on "col 7" of the temp table which may have duplicate values. Then from the temporary add to the perm table all rows. Do you have any suggestions, step by step for this NewBee? Thank you! Here is what it should look like data wise... FF Temp table Perm table Perm table Perm table "col7" after b/4 delete after delete after insert distinct ======================================================================== a a a a a b a a b c b b b d b b b b c c c c d d d d d d e e e e e e e e e

Software/Hardware used:
ASKED: September 29, 2008  9:40 PM
UPDATED: September 30, 2008  2:43 PM

Answer Wiki:
Without knowing at least what database are you using, it is not possible to give you code samples. Loading a file into a table will be different on different databases, and doing the deletions/insertions could be a little different depending also on the database. It would also be useful to know the exact criteria when deleting based on col7 of temp table. Please give some more details, and I'm sure you will get some useful responses.
Last Wiki Answer Submitted:  September 30, 2008  1:56 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Here is what it should look like data wise…

FF———–Temp table—–Perm table—–Perm table—–Perm table
—————”col7″ after—–b/4 delete——-after delete—-after insert
—————Distinct
========================================================================
A————-A——————A——————————————-A
A————-B——————A——————————————-A
B————-C—————–B——————————————-B
B——————————–B——————————————-B
B——————————–B——————————————-B
C—————————————————————————–C
C—————————————————————————–C
———————————-D————————–D—————D
———————————-D————————–D—————D
———————————-E————————–E—————E

 105 pts.

 

What database platform are you using?

 64,520 pts.

 

OK… I am in SQL 2005 and am trying to do this through SSIS. “Col 7″ can have A,B,C and it it is found on the Perm table then I want to delete it. I hope that helps…

 105 pts.