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 |
|
kenlok
Starting Member
16 Posts |
Posted - 2009-10-08 : 03:29:17
|
| How can I make it from Table 1 to Table 2Thanks<The Size[1-8] is order by SizeSeq>Table 1 JobNo FabricTrim MatDetId SizeSeq SizeSpec 112233 1 2 1 S 112233 1 2 2 M 112233 1 2 3 L 112233 1 2 4 LL 112233 1 3 1 S 112233 1 3 2 M 112233 1 3 3 L 112233 1 3 4 LL Tabe 2 JobNo FabricTrim MatDetId Size1 Size2 Size3 Size4 Size5 Size6 Size7 Size8112233 1 2 S M L LL null null null null112233 1 3 S M L LL null null null null |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-10-08 : 03:31:11
|
use PIVOT operator. Refer to Books online for syntax and further information KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
kenlok
Starting Member
16 Posts |
Posted - 2009-10-09 : 05:37:02
|
| KH, Thanks for your support, I search some book about PIVOT.But I also dont know how to write it.Would it be possible to give me some hits?ThanksKen |
 |
|
|
sanoj_av
Posting Yak Master
118 Posts |
|
|
|
|
|