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 |
rdugour@dealogic.nl
Starting Member
1 Post |
Posted - 2005-12-27 : 10:02:46
|
HelloI'm not sure my problem can be solved using pure SQL:table: compID/ compname/ compvalue/ reference2231 cap 10µF C12231 cap 10µF C72231 cap 10µF C111241 res 1K R121241 res 1K R141244 res 100E R17needed result:compID/ compname/ compvalue/ references/ number2231 cap 10µF C1,C7,C11 31241 res 1K R12,R14 21244 res 100E R17 1The query looks simple enough just a SUM/GROUPBY query, butthe nasty thing is how to concatenate the references to one stringI hope somebody has solved the problem already and is willing to help me outThanks a lotByeRobert |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-12-27 : 10:05:34
|
http://weblogs.sqlteam.com/mladenp/archive/2005/08/01/7421.aspxpoint 5put that code into a User defined function for your example.Go with the flow & have fun! Else fight the flow |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|