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: SQL Join Statement - (parameter)

Re: SQL Join Statement - (parameter)

From: Winnie Liu <poohland_at_hotmail.com>
Date: Wed, 8 Jul 1998 22:11:22 -0700
Message-ID: <6o1j5v$ov7@sjx-ixn2.ix.netcom.com>


Beware that the '&' function only works under the SQL*Plus environment. Other than that, you can write a procedure to pass in a variables for selecting criteria.

Winnie Liu

Matt Brennan wrote in message <01bdaabf$8501b900$049a0580_at_mcb>...
>Select a.field1, field 2, field3, field4, field5
>from table1 a, table 2 b
>where a.field1 = b.field1
>and a.field1 = '&inputVariable';
>--
>Matt Brennan
>SQL*Tools Specialist
>GERS Retail Systems
>9725-C Scranton Road
>San Diego, California 92121
>1-800-854-2263
>mbrennan_at_gers.com
>(Original email address is spam-blocked.)
>
>Daniel <d717_at_pacific.net.sg> wrote in article
><35a37d07.1810140_at_news.pacific.net.sg>...
>> I have two tables with a common key field "a"
>>
>> Table1 Table2
>> -field1 field1
>> -field2 field4
>> -field3 field5
>>
>> Based on an input parameter, I would like to retrieve the record where
>> (field1 = input Variable) and list out all the fields from both
>> table 1 and table2.
>>
>> When I deal with a single table (table1), I use the SQL statement ;
>>
>> Select field1, field 2, field3
>> from table1
>> where field1 = inputVariable;
>>
>> Hope some of you could help me with these SQL Join statement...
>>
>> Thanx.
Received on Thu Jul 09 1998 - 00:11:22 CDT

Original text of this message

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