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 |
malo2006
Starting Member
2 Posts |
Posted - 2010-10-14 : 10:14:56
|
Hii've a table like this:BusinessID|DepID|PersID|skill1|skill2|skill3|skill4|isFirstSkill 1 4 76 skillA NULL NULL NULL X 1 4 76 skillT NULL NULL NULL NULL 1 4 76 skillC NULL NULL NULL NULL 1 4 76 skillR NULL NULL NULL NULL 1 4 31 skillQ NULL NULL NULL NULL 1 4 31 skillB NULL NULL NULL X 1 4 31 skillC NULL NULL NULL NULL 6 4 45 skillD NULL NULL NULL X 6 4 45 skillB NULL NULL NULL NULL 1 5 49 skillA NULL NULL NULL X 8 1 77 skillA NULL NULL NULL X 8 1 77 skillE NULL NULL NULL NULLisFirstSkill defines the skill which has to be set to skill1and it should look like this because the PersonID has to be a key:BusinessID|DepID|PersID|skill1|skill2|skill3|skill4 1 4 76 skillA skillT skillC skillR 1 4 31 skillB skillQ skillC 6 4 45 skillD skillB 1 5 49 skillA 8 1 77 skillA skillE Has anyone an ideaI tried solving the problem with a cursor but it takes hours.There are about 180000 Persons in the tablemalo2006 |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2010-10-14 : 12:26:28
|
Do you have the option to fix your schema or are you already locked into that design? |
 |
|
Sachin.Nand
2937 Posts |
Posted - 2010-10-14 : 13:03:00
|
Oh man..Who on the hell designed that table ?PBUH |
 |
|
malo2006
Starting Member
2 Posts |
Posted - 2010-10-15 : 09:35:38
|
no there is no way to change the design.I got the first table out of SAP and need to transfer it into our Database where the PersonID is the key I thought that it might be possible to do that by joining the first table with itself on PersonID and the Skill1but i've no idea what to do thenanyone an idea????? |
 |
|
|
|
|