Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking if value is present upon text file import

Status
Not open for further replies.

hedgracer

Programmer
Mar 21, 2001
186
US
Here is what I need to do. I need to import a .csv file and step through the file row by row all the while comparing a particular field to a value in a field in a table. For example:

file.csv has a firm field with the letters A, B, C, and D in each of the four rows. Table One has a Val field with the letters A, B, D, and E in its four rows. I need to compare the firm field to the Val field and if the letters are the same do not import but if they are different I need to import into the Val field.

Is there any way to do this in SSIS. I thought of using a Lookup with a Conditional Split but that does not seem to be working. Any help is appreciated. Thanks.

Dave
 
DO these tables have a column or columns that can be used to join records together?

Paul
---------------------------------------
Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
No. I don't think a join would work in this situation. I am comparing the firm column in the .csv import file with the val column in the table one table and if they are not equal then I am inserting the value in the firm column in the val column.

Dave
 
can you give some data as an example. What I am understanding is you are more or less performaing a lookup type operation. If val = X do this or if val = Y do something else.

Paul
---------------------------------------
Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top