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 |
|
dutyfree
Starting Member
5 Posts |
Posted - 2009-11-13 : 13:56:08
|
| HelloI wish to display the following output into the one below this. ID Prc PID Ask Bid ---------------- ------- ---------------- ------- ------ 091113044932.138 103.399 2009111223493223 109.004 (null) 091113044932.138 103.399 2009111223493223 108.53 (null) 091113044932.138 103.399 2009111223493223 103.399 (null) 091113092441.543 99.649 200911130424413 (null) 93.482 091113092441.543 99.649 200911130424413 (null) 96.719 091113092441.543 99.649 200911130424413 (null) 92.613 091113092441.543 99.649 200911130424413 (null) 99.649 091113092441.543 99.649 200911130424413 (null) 91.28 091113151718.664 92.104 2009111310171827 (null) 92.018 091113151718.664 92.104 2009111310171827 (null) 97.155 091113151718.664 92.104 2009111310171827 (null) 92.104 Into the results below ID Prc PID P1 P2 P3 P4 P5 ---------------- ------- ---------------- ---- --- ---- ---- ---- 091113044932.138 103.399 2009111223493223 103.399 108.53 109.004 (null) (null) 091113092441.543 99.649 200911130424413 91.28 92.613 93.482 96.719 99.649 091113151718.664 92.104 2009111310171827 92.018 92.104 97.155 (null) (null)Basically i need to change the rows Ask and Bid into columns.I wish to avoid PIVOT usage. Any other ideas on how i can achieve thisthanks |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2009-11-13 : 13:57:54
|
That should help use read it...use code tagsquote: Originally posted by dutyfree HelloI wish to display the following output into the one below this. ID Prc PID Ask Bid ---------------- ------- ---------------- ------- ------ 091113044932.138 103.399 2009111223493223 109.004 (null) 091113044932.138 103.399 2009111223493223 108.53 (null) 091113044932.138 103.399 2009111223493223 103.399 (null) 091113092441.543 99.649 200911130424413 (null) 93.482 091113092441.543 99.649 200911130424413 (null) 96.719 091113092441.543 99.649 200911130424413 (null) 92.613 091113092441.543 99.649 200911130424413 (null) 99.649 091113092441.543 99.649 200911130424413 (null) 91.28 091113151718.664 92.104 2009111310171827 (null) 92.018 091113151718.664 92.104 2009111310171827 (null) 97.155 091113151718.664 92.104 2009111310171827 (null) 92.104 Into the results below ID Prc PID P1 P2 P3 P4 P5 ---------------- ------- ---------------- ---- --- ---- ---- ---- 091113044932.138 103.399 2009111223493223 103.399 108.53 109.004 (null) (null) 091113092441.543 99.649 200911130424413 91.28 92.613 93.482 96.719 99.649 091113151718.664 92.104 2009111310171827 92.018 92.104 97.155 (null) (null) Basically i need to change the rows Ask and Bid into columns.I wish to avoid PIVOT usage. Any other ideas on how i can achieve thisthanks
Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
dutyfree
Starting Member
5 Posts |
Posted - 2009-11-13 : 14:10:21
|
| Hi BrettThanks for all this.The hack seems too much work to apply in a proc.Any more ideas? Much appreciatedThanks |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|