Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORACLE SQL Help
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
![]() |
![]() |