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: Question about an insert query

Re: Question about an insert query

From: <shiling_at_math.wayne.edu>
Date: Mon, 24 May 1999 12:11:41 GMT
Message-ID: <7ibfls$rh0$1@nnrp1.deja.com>


Try 'in' operator in stead of '='

tableb.linkfield IN (SELECT linkfield from tablec where tablealink = 1)

In article <3749307e.2746848_at_news.demon.co.uk>,   steve.hovingtonREMOVE_at_datacore.demon.co.uk wrote:
> Hi, I have an insert query, and the problem is the subquery in the
> where statement at the end produces more than one record. Is it
> possible to do an insert for each of those links in the sub-query
> without using PL/SQL?
> (I'm using Oracle 7.3.4 )
>
> INSERT INTO tablea
> (field1, field2, field3)
> SELECT
> (field1, field2, field3
> FROM tableb
> WHERE
> tableb.linkfield = (SELECT linkfield from tablec where tablealink =
> 1)
>
> Thanks in advance,
>
> Steven H.
>

--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Mon May 24 1999 - 07:11:41 CDT

Original text of this message

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