Home » SQL & PL/SQL » SQL & PL/SQL » can any one help me in forming the below requested query
can any one help me in forming the below requested query [message #612176] Mon, 14 April 2014 02:25 Go to next message
karthik7narla
Messages: 9
Registered: December 2013
Location: hyderabad
Junior Member
hello friends ,

i have a table like ,


sno eid ename loc flag

1 e1 xyz bang curnt
2 e1 xyz us old
3 e2 abc hyd currnt
4 e2 abc chenn old

and i need an o/p in the below format

output:

ename old_location current_location
xyz us bang
abc chenn hyd

thanks in advance Smile
Re: can any one help me in forming the below requested query [message #612178 is a reply to message #612176] Mon, 14 April 2014 02:29 Go to previous messageGo to next message
Michel Cadot
Messages: 59497
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

It is a standard PIVOT question (search for this key word).

Re: can any one help me in forming the below requested query [message #612180 is a reply to message #612178] Mon, 14 April 2014 03:01 Go to previous messageGo to next message
karthik7narla
Messages: 9
Registered: December 2013
Location: hyderabad
Junior Member
Thanks for your quick response .
will it support in oracle 10g , currently i am using oracle 10g
Re: can any one help me in forming the below requested query [message #612182 is a reply to message #612180] Mon, 14 April 2014 03:23 Go to previous message
Michel Cadot
Messages: 59497
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

I mean PIVOT as a method not as a SQL feature (which is 11g+ only).
Note that you should ALWAYS post your Oracle version in your questions (as well as a test case).

[Updated on: Mon, 14 April 2014 03:23]

Report message to a moderator

Previous Topic: Distinct & Group By when used Analytic Function
Next Topic: Remove all entries except last one
Goto Forum:
  


Current Time: Thu Oct 30 11:06:42 CDT 2014

Total time taken to generate the page: 0.13461 seconds