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 |
ronedin
Starting Member
29 Posts |
Posted - 2007-10-15 : 22:54:16
|
Hi friends,I am facing a problem. I have a excel sheet with a 'single cell' displayed like this :List of Employees FirstNameArranged StateWiseCalifornia97 Kathy101 Jack102 SuzanneTexas103 Gonzalles104 Ricardo111 KateVirginia125 Jim126 Rockyand so on..where California is the state, 97 is empid and Kathy is empnameThis has to be populate in a table EmployeeEmpidEmpFNameStateidStateStateIdStateNameSo during populating, we need to compare "California" against the statename field of State and pick up id and then populate the Employee table in sql server 2005EXPECTED Output97 Kathy 01101 Jack 01102 Suzanne 01103 Gonazalles 02104 Ricardo 02105 Kate 02 and so on....I have populated the excel cell into a staging table containing nvarchar(100)..but what to do after that?thanks |
|
igorblackbelt
Constraint Violating Yak Guru
407 Posts |
Posted - 2007-10-16 : 14:12:53
|
Haven't done anything like this before, but I would either have to write my own script do what I want or look into something like the link below.(I believe I saw Kristen posting something similar somewhere that I can't think of right now.)http://www.datadefractor.com/Home/AboutDataDefractorSSIS/tabid/73/Default.aspx |
 |
|
Kristen
Test
22859 Posts |
|
ronedin
Starting Member
29 Posts |
Posted - 2007-10-18 : 00:19:09
|
Hi,I first thought of doing it using SSIS, but later wanted a quick approach through sql. Thanks for helping me over there. |
 |
|
|
|
|