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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORACLE SQL Help

Re: ORACLE SQL Help

From: Alexei VORONOV <alexei_voronov_at_yahoo.com>
Date: Thu, 18 Oct 2001 17:55:04 +0200
Message-ID: <9qmu97$fdl$1@wanadoo.fr>


I have:

SQL> select * from q;

    MQ_ID MQ_LABEL

--------- ------------------------------
        1 What
        2 Label

SQL> select * from a;

    MA_ID MA_ANSWER

--------- ------------------------------
        1 Nothing

SQL> select q.mq_id, q.mq_label, a.ma_answer from q, a where q.mq_id (+) = a.ma_id;

    MQ_ID MQ_LABEL                       MA_ANSWER
--------- ------------------------------ ------------------------------
        1 What                           Nothing

SQL> select q.mq_id, q.mq_label, a.ma_answer from q, a where q.mq_id = a.ma_id (+);

    MQ_ID MQ_LABEL                       MA_ANSWER
--------- ------------------------------ ------------------------------
        1 What                           Nothing
        2 Label

Is that what you want or no?

"Tim Mason" <tlmason840_at_aol.com> a écrit dans le message news: 258a1e3f.0110180723.14c9b955_at_posting.google.com...
> I have two tables a questions table and an answer table. In the
> questions table I have section labels also. These labels do not have
> corresponding records in the answers table and I am trying to retrieve
> both the questions with the answers and the labels. Below is the
> query I have tried but it is only pulling the records that have
> entries in both tables.
>
> SELECT A.MQ_ID, A.MQ_Number, A.MQ_Question, A.MP_ID, A.MQ_Type,
> B.MA_ID, B.MA_Answer, B.ME_ID
> FROM MON_Question A,
> MON_Answer B
> WHERE A.MQ_ID(+) = B.MQ_ID
>
> Any help on this would be greatly appreciated. I am using Oracle 8.05
>
> Thanks
> Tim Mason
Received on Thu Oct 18 2001 - 10:55:04 CDT

Original text of this message

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