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 |
|
pipeclay
Starting Member
3 Posts |
Posted - 2006-12-17 : 10:04:12
|
| I am currently developing a small application which will calculate a total cost for a product in a business system. I am currently having a bit of problem with the sql parts though and I hope you can help me. The situation is as follow:One table consists of the article structure like this:Article | Consists Ofa | bb | cc | dI want this transformed to:Article | Consists Ofa | ba | ca | dIt seems simple enough but my sql programming is a bit rusty to say the least. Lend a hand? |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-17 : 10:37:42
|
I can't seem to get the logic behind the transformation...What do you really want to do?Update tblset Article = 'a'Where [Consists of] in ('b', 'c', 'd') Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
pipeclay
Starting Member
3 Posts |
Posted - 2006-12-17 : 12:15:16
|
| Well, the structure was just an example. The thing is that an article can consist of an article which in turn can consist of an article. This leading to article A have subarticle B. B can in turn have another subarticle C. This means that A actually consists of both B and C which is not showed directly, only that A consists of B and B consists of C What I want is to show that A consists of both B and C.Hope that made it more clear. |
 |
|
|
pipeclay
Starting Member
3 Posts |
Posted - 2006-12-17 : 12:16:45
|
| And as a side note, I cannot change the database I am reading from, I have to read it to a new one. |
 |
|
|
|
|
|