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: Select Queries

Re: Select Queries

From: Jerry Gitomer <jgitomer_at_ictgroup.com>
Date: Thu, 04 Mar 1999 13:50:29 GMT
Message-ID: <FcwD2.32894$rs2.10069073@client.news.psi.net>


Hi,

    How about:

    INSERT INTO int_poheader

        ponum, podate
        (SELECT * FROM tmp_poheader
         MINUS
        SELECT * FROM poheader
        WHERE tmp_poherader.ponum = poheader.ponum)

If both tmp_poheader and poheader are indexed on ponum it *should* run reasonably well.

regards

Jerry Gitomer

Arthur Merar wrote in message <36de169c.9384615_at_news.chaven.com>...
>
>
>Hello,
>
>I am having trouble creating a query that will select all records in
>one table that do NOT have a matching record in another table.....
>
>I tried something like this:
>
>Insert into INT_POHEADER
> ponum, podate
> (Select * from TMP_POHEADER where
> ponum NOT IN (select * from POHEADER))
>
>Can anyone help me out?
>
>Thanks,
>
>Arthur
>amerar_at_unsu.com
>
Received on Thu Mar 04 1999 - 07:50:29 CST

Original text of this message

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