Home » SQL & PL/SQL » SQL & PL/SQL » SQL query Problem
SQL query Problem [message #251815] Mon, 16 July 2007 14:56 Go to next message
bigpapi
Messages: 6
Registered: June 2007
Junior Member
I have one field called CODE and another one called TYPE.
there are two types of values for TYPE. 'A' and 'B'

What i want to do is return the CODE to one column when the TYPE = A and return the CODE to the other column when the TYPE = B

so my results should look like this:

--A----B--
012 ------
213 ------
------432-
315-------
------562
Re: SQL query Problem [message #251822 is a reply to message #251815] Mon, 16 July 2007 16:05 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
Please read & FOLLOW the posting guidelines as specified in the STICK posts at teh top of this forum.
Re: SQL query Problem [message #251873 is a reply to message #251815] Tue, 17 July 2007 01:07 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And once more a basic "pivot" (search for this word) query.
./fa/448/0/
Topic closed
Regards
Michel
Previous Topic: Character Set in Oracle
Next Topic: QUOTA: Oops
Goto Forum:
  


Current Time: Sat Dec 10 12:40:25 CST 2016

Total time taken to generate the page: 0.14286 seconds