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