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 |
|
dyckwal
Yak Posting Veteran
58 Posts |
Posted - 2005-10-19 : 05:22:25
|
| Hello everyoneI have the following.Have a table Item_Inbound containingItem_Code, Units, Sub_Units, StatusNeed to create a new table ExportStock containingItem_Code, StockFree, StockBlockedExample Item_InboundItem_Code Units Sub_Units StatusA1200 100 10 1A1200 50 10 1A1200 100 10 2B1300 80 20 1C1400 60 12 2The table ExportStock should likeItem_Code StockFree StockBlockedA1200 1500 1000B1300 1600 0C1400 0 720I'm looking for a one stop solution to get from one table to the other...Can someone help me???ThanksWalter |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-10-19 : 05:27:07
|
| What is your expected result?MadhivananFailing to plan is Planning to fail |
 |
|
|
dyckwal
Yak Posting Veteran
58 Posts |
Posted - 2005-10-19 : 05:50:05
|
| Example Item_InboundItem_Code Units Sub_Units StatusA1200 100 10 1A1200 50 10 1A1200 100 10 2B1300 80 20 1C1400 60 12 2The table ExportStock should likeItem_Code StockFree StockBlockedA1200 1500 1000B1300 1600 0C1400 0 720 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
dyckwal
Yak Posting Veteran
58 Posts |
Posted - 2005-10-19 : 07:35:50
|
| Thanks for the tip madhivanan.Found a simelair solution like the crostab procedure described.Thanks again..Walter |
 |
|
|
|
|
|