我在Base中有以下查询:
SELECT field_name1, field_name2, .,.,.
FROM table_a
INNER JOIN table_b
ON table_a.field_name1 = table_b.field_name1
INNER JOIN table_c
ON table_a.field_name2 = table_c.field_name2
INNER JOIN table_d
ON table_d.field_name1 = table_b.field_name2
LEFT JOIN table_e
ON table_e.field_name1 = table_c.field_name2 AND
table_e.field_name2 = table_b.field_name1
当我从table_a中删除一行时,Base解析器也会从table_e中删除该行。添加或修改行是可以的,在删除行时只是一个问题。这是实际的代码:
FROM "Futures_Orders"
INNER JOIN "Contract_Details"
ON "Contract_Details"."Symbol" = "Futures_Orders"."Symbol"
INNER JOIN "Broker"
ON "Broker"."Broker" = "Futures_Orders"."Broker"
INNER JOIN "FX_Rates"
ON "FX_Rates"."Code" = "Contract_Details"."Currency"
LEFT JOIN "Broker_Commissions"
ON "Broker_Commissions"."Broker" = "Broker"."Broker" AND
"Broker_Commissions"."Symbol" = "Contract_Details"."Symbol"
除了来自futures_orders的行,还会删除Broker_Commissions中的一行。