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 |
|
wshawnsmith
Starting Member
2 Posts |
Posted - 2009-04-14 : 16:03:03
|
| below is the results from the queryselect ProductNo ,UPC+'<mulitsep/>'+ isnull(I2o51+'<mulitsep/>','')+ isnull(I2o52+'<mulitsep/>','')+ isnull(I2o53+'<mulitsep/>','')+ isnull(I2o54+'<mulitsep/>','')+ isnull(I2o55+'<mulitsep/>','')+ isnull(I2o56+'<mulitsep/>','')+ isnull(I2o57+'<mulitsep/>','')+ isnull(I2o58+'<mulitsep/>','')+ isnull(I2o59+'<mulitsep/>','')from UPCBuildTEMP2where GlobalProductNumber is not nulland ProductNo=100016100016 0-81999-12334-5 1 PIECE<mulitsep/>1-00-81999-12334-2 (128) PIECES<mulitsep/> 100016 0-73291-32620-3 1 PIECEI need to select 0-73291-32620-3 1 PIECEin the same row instead of a different one, to look like this:100016 0-81999-12334-5 1 PIECE<mulitsep/>1-00-81999-12334-2 (128) PIECES<mulitsep/>0-73291-32620-3 1 PIECEBut it is a different row. And I do not want to do a cursor, is there a simple way to select the next UPC and any I205s it may have out? |
|
|
Kokkula
Starting Member
41 Posts |
|
|
wshawnsmith
Starting Member
2 Posts |
Posted - 2009-04-16 : 14:14:57
|
| These are varchar fields, PIVOT won't work. Right? At least I can't get it to.Shawn |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|
|
|