Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Query Help

RE: Query Help

From: Zhong Hong <zhong_at_cantametrix.com>
Date: Mon, 2 Oct 2000 15:05:04 -0700
Message-Id: <10637.118350@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C02CBC.D13C7D10
Content-Type: text/plain;

        charset="iso-8859-1"

Use self join.

Zhong
It's another beautiful day!

-----Original Message-----
From: Richard Ji [mailto:richard_at_letsplay.com] Sent: Monday, October 02, 2000 2:26 PM
To: Multiple recipients of list ORACLE-L Subject: RE: Query Help

You can't do it in SQL alone as far as I know (so if you did manage to do it in SQL, please let me know. :) ). I want to solve the same problem like you did. You have to use PL/SQL or other procedural language to process it and produce the result in the way you wanted.

Richard Ji

-----Original Message-----
Sent: Monday, October 02, 2000 3:36 PM
To: Multiple recipients of list ORACLE-L

Hi All,

I have a table called
user_prop
(user_id ,prop_id,prop_value)

When I do select user_id,prop_value from user_prop where prop_id in ('BDATE','SEX','CITY');

It would display like..

1234 18051999
1234 Male
1234 Toronto

Is there a way to display result like..

1234 18051999 Male Toronto --in one row..!!

Thanks.
Is there a way to display query results



Ashish
Toronto, Canada

Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free! http://photos.yahoo.com/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Ashish Shah
  INET: ar_shah_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Richard Ji INET: richard_at_letsplay.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). ------_=_NextPart_001_01C02CBC.D13C7D10 Content-Type: text/html; charset="iso-8859-1" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2651.75"> <TITLE>RE: Query Help</TITLE> </HEAD> <BODY> <P><FONT SIZE=2>Use self join.</FONT> </P> <P><FONT SIZE=2>Zhong</FONT> <BR><FONT SIZE=2>It's another beautiful day!</FONT> </P> <BR> <P><FONT SIZE=2>-----Original Message-----</FONT> <BR><FONT SIZE=2>From: Richard Ji [<A HREF="mailto:richard_at_letsplay.com">mailto:richard_at_letsplay.com</A>]</FONT> <BR><FONT SIZE=2>Sent: Monday, October 02, 2000 2:26 PM</FONT> <BR><FONT SIZE=2>To: Multiple recipients of list ORACLE-L</FONT> <BR><FONT SIZE=2>Subject: RE: Query Help</FONT> </P> <BR> <P><FONT SIZE=2>You can't do it in SQL alone as far as I know (so if you did manage to do it</FONT> <BR><FONT SIZE=2>in SQL, please let me know. :) ).&nbsp; I want to solve the same problem like you</FONT> <BR><FONT SIZE=2>did.&nbsp; You have to use PL/SQL or other procedural language to process it and</FONT> <BR><FONT SIZE=2>produce the result in the way you wanted.</FONT> </P> <P><FONT SIZE=2>Richard Ji</FONT> </P> <P><FONT SIZE=2>-----Original Message-----</FONT> <BR><FONT SIZE=2>Sent: Monday, October 02, 2000 3:36 PM</FONT> <BR><FONT SIZE=2>To: Multiple recipients of list ORACLE-L</FONT> </P> <BR> <P><FONT SIZE=2>Hi All,</FONT> </P> <BR> <P><FONT SIZE=2>I have a table called</FONT> <BR><FONT SIZE=2>user_prop</FONT> <BR><FONT SIZE=2>(user_id ,prop_id,prop_value)</FONT> </P> <P><FONT SIZE=2>When I do select user_id,prop_value from user_prop</FONT> <BR><FONT SIZE=2>where prop_id in ('BDATE','SEX','CITY');</FONT> </P> <P><FONT SIZE=2>It would display like..</FONT> </P> <P><FONT SIZE=2>1234 18051999</FONT> <BR><FONT SIZE=2>1234 Male</FONT> <BR><FONT SIZE=2>1234 Toronto</FONT> </P> <P><FONT SIZE=2>Is there a way to display result like..</FONT> </P> <P><FONT SIZE=2>1234 18051999 Male Toronto --in one row..!!</FONT> </P> <P><FONT SIZE=2>Thanks.</FONT> <BR><FONT SIZE=2>Is there a way to display query results</FONT> </P> <P><FONT SIZE=2>=====</FONT> <BR><FONT SIZE=2>Ashish</FONT> <BR><FONT SIZE=2>Toronto, Canada</FONT> </P> <P><FONT SIZE=2>__________________________________________________</FONT> <BR><FONT SIZE=2>Do You Yahoo!?</FONT> <BR><FONT SIZE=2>Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!</FONT> <BR><FONT SIZE=2>http://photos.yahoo.com/</FONT> <BR><FONT SIZE=2>--</FONT> <BR><FONT SIZE=2>Please see the official ORACLE-L FAQ: http://www.orafaq.com</FONT> <BR><FONT SIZE=2>--</FONT> <BR><FONT SIZE=2>Author: Ashish Shah</FONT> <BR><FONT SIZE=2>&nbsp; INET: ar_shah_at_yahoo.com</FONT> </P> <P><FONT SIZE=2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=2>San Diego, California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet access / Mailing Lists</FONT> <BR><FONT SIZE=2>--------------------------------------------------------------------</FONT> <BR><FONT SIZE=2>To REMOVE yourself from this mailing list, send an E-Mail message</FONT> <BR><FONT SIZE=2>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in</FONT> <BR><FONT SIZE=2>the message BODY, include a line containing: UNSUB ORACLE-L</FONT> <BR><FONT SIZE=2>(or the name of mailing list you want to be removed from).&nbsp; You may</FONT> <BR><FONT SIZE=2>also send the HELP command for other information (like subscribing).</FONT> </P> <P><FONT SIZE=2>-- </FONT> <BR><FONT SIZE=2>Please see the official ORACLE-L FAQ: http://www.orafaq.com</FONT> <BR><FONT SIZE=2>-- </FONT> <BR><FONT SIZE=2>Author: Richard Ji</FONT> <BR><FONT SIZE=2>&nbsp; INET: richard_at_letsplay.com</FONT> </P> <P><FONT SIZE=2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=2>San Diego, California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet access / Mailing Lists</FONT> <BR><FONT SIZE=2>--------------------------------------------------------------------</FONT> <BR><FONT SIZE=2>To REMOVE yourself from this mailing list, send an E-Mail message</FONT> <BR><FONT SIZE=2>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in</FONT> <BR><FONT SIZE=2>the message BODY, include a line containing: UNSUB ORACLE-L</FONT> <BR><FONT SIZE=2>(or the name of mailing list you want to be removed from).&nbsp; You may</FONT>
Received on Mon Oct 02 2000 - 17:05:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US