Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Question about an insert query
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
![]() |
![]() |