Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
dayjaa3
Starting Member
4 Posts |
Posted - 2012-09-07 : 16:27:48
|
| I receive a flat file which I am importing with SSIS. The problem is the file does not contain a needed field(ssn). I have to query another table to find the ssn information. As an example, I receive a file with about 250 records. These records have firstname, lastname, and dob. I need to use this information to query the other table to find the SSN and add that to a new table. So for each record I must find the corresponding SSN located in the other table. Does anyone have a good idea about how to approach this?Thanks in advance. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
dayjaa3
Starting Member
4 Posts |
Posted - 2012-09-07 : 16:37:03
|
| How would the query look for this? Select e.ssn, t.dob,tfirstname, tlastname from Eligibility eJOIN Test t on e.id = t.id. How would I use each dob, firstname, lastname as parameters? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
dayjaa3
Starting Member
4 Posts |
Posted - 2012-09-10 : 08:38:04
|
| I need to use the FirstName, LastName and Dob from the flat file to find the ssn. So whereever the 3 criteria match a record I would pull that ssn |
 |
|
|
dayjaa3
Starting Member
4 Posts |
Posted - 2012-09-10 : 08:51:48
|
| I think the issue that I'm having is how to use multiple sets of parameters. For example in C# i would have an array and say foreach "set of firstname, lastname and dob" select the corresponding ssn and then i would put the results in an array. I'm not understanding how to say this in tsql. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|
|
|