Need a Help to get best output (merged) [message #343820] |
Thu, 28 August 2008 05:06  |
akalinga
Messages: 2 Registered: August 2008 Location: Malaysia
|
Junior Member |
|
|
I have a table like this
DeptName EmpNo
A 1
A 2
B 3
B 4
I required output like this
A B
1 Null
2 Null
Null 3
Null 4
what's the best way to write a pl/sql select query
|
|
|
|
Need a Help to get best output [message #344142 is a reply to message #343820] |
Thu, 28 August 2008 20:33   |
akalinga
Messages: 2 Registered: August 2008 Location: Malaysia
|
Junior Member |
|
|
Below method i tried with decode statement but deptname is vary and will not be consistant. So decode will be bitt tuff in that situation.
Kinldy give me a good method to get the output as below.
I have a table like this
DeptName EmpNo
A 1
A 2
B 3
B 4
I required output like this
A B
1 Null
2 Null
Null 3
Null 4
Thanks for everyone
|
|
|
|
|
|
|
Re: Need a Help to get best output [message #344178 is a reply to message #344177] |
Fri, 29 August 2008 00:38   |
 |
Michel Cadot
Messages: 68737 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
As for the previous answer you gave:
Michel Cadot wrote on Thu, 28 August 2008 09:18 | @hamidmahmood,
Follow the guidelines:
- format your post
- don't give solution just clue
OraFAQ Forum Guide, "How to format your post?" section.
OraFAQ Forum Guide, "Responding to Posts" section:
Quote: | When responding to questions, if it is obviously a student with a homework assignment or someone else just learning, especially in the homework and newbies forums, it is usual to provide hints or clues, perhaps links to relevant portions of the documentation, or a similar example, to point them in the right direction so that they will research and experiment on their own and learn, and not provide complete solutions to problems. In cases where someone has a real-life complex work problem, or at least it may seem complex to them, it may be best to provide a complete demo and explanation.
|
|
Regards
Michel
|
|
|
|
|