Larry,

 

So I could add another check in the same EEP like below as long as the
table is not the destination table?

 

PROJECT TEMPORARY TEMP_PROD USING *

Insert into PRODUCT_NEW select
CONTROL#,MODEL#,'N','N','N','N','N','N','N','N','-0-' +

            from ORDERDETAIL where +

MODEL# not in (select MODEL# from TEMP_PROD) AND +

MODEL# not in (select MODEL# from PRODUCT)

RETURN

 

As you can see, I am adding other information into the PRODUCT_NEW table
so I think I will try the INSERT.

 

Upon row exit I would have to DROP the temporary table, correct, since I
may have new items in the same quote on another line?

 

Jim

 

 

________________________________

From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence
Lustig
Sent: Monday, April 06, 2009 4:30 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: insert needed item into table

 

<< 

I got an error message stating I could not have the destination table as
part of the FROM clause.

Any suggestions would be appreciated.

>> 

 

Yes, R:Base does have this limitation on the INSERT statement.  However,
the similar APPEND statement does not have the same issue.  If your
columns are named the same in OrderDetail and PRODUCT_NEW then you can
use APPEND instead of INSERT and include the additional criteria in your
WHERE clause.

 

Otherwise, the way I handle this is to throw the PRODUCT_NEW records
into a temporary table and check against _that_ table instead of the
original.

--

Larry

 

 

Reply via email to