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 |
|
dewacorp.alliances
452 Posts |
Posted - 2003-01-18 : 18:33:46
|
| Hi thereI had 3 tables which the structure like this:tblAsset:+ AssetID int+ Name varchar(50)tblSplitSet:+ SplitSetID+ AssetIDtblSplit:+ SplitID+ SplitSetID+ Percentage The sample data for each table are:tblAsset:+ 1; Mobile Phone+ 2; PCtblSplitSet+ 10; 1+ 11; 2tblSplit:+ 100; 10; 50;+ 101; 10; 50;+ 102; 11; 25;+ 103; 11; 25;+ 104; 11; 50; If I join these 3 tables it will be like:+ 1; Mobile Phone; 100; 10; 50;+ 1; Mobile Phone; 101; 10; 50;+ 2; PC; 102; 11; 25;+ 2; PC; 103; 11; 25;+ 2; PC; 104; 11; 50;Rather than have view like that, I want to have a view/table like these:1; Mobile Phone; 50; 50; 0; 0; 02; PC ; 25; 25; 50; 0; 0Note that the maximum split is specified which is 5. So any ideas to make a view/temp table like thisPlease helpThanks |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
|
|
|
|
|