![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Greetings, I have a table format as below sec * * * value * * * *type X * * * * *100 * * * * * T X * * * * *200 * * * * * S Y * * * * 300 * * * * * *T Y * * * * 400 * * * * * *S Z * * * * *500 * * * * * T Z * * * * *600 * * * * * S I want to pivot the above to somethin as below sec * * T * * * * * S X * * * *100 * * * *200 Y * * * *300 * * * 400 Z * * * *500 * * * *600 Can anyone please advise. I have been looking for pivot logic for some time but could not figure this out. |
#3
| |||
| |||
|
|
On Dec 4, 10:36*am, Pankaj <harpreet.n... (AT) gmail (DOT) com> wrote: Greetings, I have a table format as below sec * * * value * * * *type X * * * * *100 * * * * * T X * * * * *200 * * * * * S Y * * * * 300 * * * * * *T Y * * * * 400 * * * * * *S Z * * * * *500 * * * * * T Z * * * * *600 * * * * * S I want to pivot the above to somethin as below sec * * T * * * * * S X * * * *100 * * * *200 Y * * * *300 * * * 400 Z * * * *500 * * * *600 Can anyone please advise. I have been looking for pivot logic for some time but could not figure this out. * <http://www.lmgtfy.com/?q=oracle+pivot+query&l=1 -- Peter- Hide quoted text - - Show quoted text - |
#4
| |||
| |||
|
|
On Dec 3, 7:08*pm, Peter Nilsson <ai... (AT) acay (DOT) com.au> wrote: On Dec 4, 10:36*am, Pankaj <harpreet.n... (AT) gmail (DOT) com> wrote: Greetings, I have a table format as below sec * * * value * * * *type X * * * * *100 * * * * * T X * * * * *200 * * * * * S Y * * * * 300 * * * * * *T Y * * * * 400 * * * * * *S Z * * * * *500 * * * * * T Z * * * * *600 * * * * * S I want to pivot the above to somethin as below sec * * T * * * * * S X * * * *100 * * * *200 Y * * * *300 * * * 400 Z * * * *500 * * * *600 Can anyone please advise. I have been looking for pivot logic for some time but could not figure this out. * <http://www.lmgtfy.com/?q=oracle+pivot+query&l=1 -- Peter- Hide quoted text - - Show quoted text - Thanks Peter. As I said earlier, I did tried google but could not found the correct way of implementing the logic. Also, the domain for sec is not fixed. I have just shown X, Y and Z but there could be more. Thanks for your time. |
#5
| |||
| |||
|
|
On Dec 3, 4:28*pm, Pankaj <harpreet.n... (AT) gmail (DOT) com> wrote: On Dec 3, 7:08*pm, Peter Nilsson <ai... (AT) acay (DOT) com.au> wrote: On Dec 4, 10:36*am, Pankaj <harpreet.n... (AT) gmail (DOT) com> wrote: Greetings, I have a table format as below sec * * * value * * * *type X * * * * *100 * * * * * T X * * * * *200 * * * * * S Y * * * * 300 * * * * * *T Y * * * * 400 * * * * * *S Z * * * * *500 * * * * * T Z * * * * *600 * * * * * S I want to pivot the above to somethin as below sec * * T * * * * * S X * * * *100 * * * *200 Y * * * *300 * * * 400 Z * * * *500 * * * *600 Can anyone please advise. I have been looking for pivot logic for some time but could not figure this out. * <http://www.lmgtfy.com/?q=oracle+pivot+query&l=1 -- Peter- Hide quoted text - - Show quoted text - Thanks Peter. As I said earlier, I did tried google but could not found the correct way of implementing the logic. Also, the domain for sec is not fixed. I have just shown X, Y and Z but there could be more. Thanks for your time. Oddly enough, clicking on that link led me directly to this one:http://asktom.oracle.com/pls/asktom/...11_QUESTION_ID... You must be so cool, getting people to google for you! jg -- @home.com is bogus. "Contrary to what I said at the time, we must go after the idiots who lost the discs and stick cocktail sticks in their eyes until they beg for mercy." - Jeremy Clarkson- Hide quoted text - - Show quoted text - |
#6
| |||
| |||
|
|
On Dec 3, 7:04 pm, joel garry<joel-ga... (AT) home (DOT) com> wrote: .... You must be so cool, getting people to google for you! jg -- @home.com is bogus. "Contrary to what I said at the time, we must go after the idiots who lost the discs and stick cocktail sticks in their eyes until they beg for mercy." - Jeremy Clarkson- Hide quoted text - - Show quoted text - Thanks Joel. I will get back in case any more queries. |
![]() |
| Thread Tools | |
| Display Modes | |
| |