I have the problem of splitting the the table into following way.
Pl help me in doing it

Actual table
Product Id ProductQty CompCapacity
1 8000 5000
2 10000 5000
4000
4000

Resultant table
Product Id ProductQty CompCapacity
2 5000 5000
2 5000 5000
1 4000 4000
1 4000 4000

Recommended Answers

All 2 Replies

It seems you want to transpose the column to different row. I understand that the column targeted for transpose is compCapacity from actual table. In target/resultant table do you already have the value for other columns ProductId and ProductQty.

hi usenthil75,

resultant table looks nice. Obviously scheduling problem on how to assign demands to resources. But it's rather impossible to figure out what strategy you have been using, you need to be more specific. Otherwise it is rather impossible to advise you an appropriate sql statement.

krs,
tesu

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.