Multi-record insert/append using sub-query list - and Binary
Links
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Jul 19 02:48:18 CDT 2007
On 19/7/07 8:05 AM, "Barry G. Sumpter" <BarrySum at BigPond.Net.AU> wrote:
Hi Barry,
Right. I think you can have in table OldOrders one more utility Boolean
field. And use it to mark new 100 records as TRUE.
Then you will be able use this
LINK RECORD(1) OF Shops
WITH RECORDS
(SELECT OldOrders.RecID on Orders_1_M_OldOrders where fldIsNew = TRUE)
Then you need cleanup this flag
UPDATE OldOrders
SET fldIsNew = FALSE
WHERE fldIsNew = TRUE
> Just had a flash.
>
> If I could somehow identify the records just inserted into OldOrders as NOT
> having a Binary Link and then Updateing each of those with
>
> LINK RECORD(1) OF Shops
> WITH RECORDS
> (SELECT OldOrders.RecID on Orders_1_M_OldOrders where OldOrders.RecID = 0)
> ??????
>
>
>
> -----Original Message-----
> From: valentina-bounces at lists.macserve.net
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of Barry G. Sumpter
> Sent: Thursday, 19 July 2007 2:38 PM
> To: 'Valentina Developers'
> Subject: Multi-record insert/append using sub-query list - and Binary Links
>
> Hi all,
>
>
>
> INSERT INTO OldOrders ( order_num, order_date, amount )
> SELECT order_num, order_date, amount
> FROM orders
> WHERE order_date < '01-JAN-90'
>
> Lets say that the sub query returned 100 orders records.
> Lets also say that the OldOrders table has a binary link of 1 to M with a
> shop table.
> i.e. each shop has many many OldOrders
>
> is there a way to update the binary link with the same Insert?
>
> If not, any suggestions?
>
> I'd rather not have to execute a single Link Record command for each of the
> 100 order records.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list