如果同一ID的所有记录在另一个表中删除,则根据一个表中的ID删除记录
请帮助我逻辑。 我有两张客户和交易表,并且有列操作i,u,D。如果列是我或u删除数据,则在交易表中删除数据。如果删除了同一事务ID的所有记录删除客户记录else else删除可以进行插入,UPSERT,使用更新策略在交易表中删除的交易记录
,但是如果删除相同的交易ID,我们如何删除客户记录
pls help me with logic.
I have two tables of customers and transactions and there is column action I, U, D. If column action is I or U upsert the data if it is D delete the data in transactions tables.If all records of same transaction id are deleted then delete customers record else delete the transactions record
We can do insert,upsert,delete using Update strategy in transaction table but how can we delete the customer record if the same transaction IDs deleted
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要创建一个逻辑(如您说的那样)才能从客户表中删除。并且更安全地在同一映射或全新的映射中创建新管道。
因此,您将从客户中读取Customer_key,查找交易表(在Customer_key上的条件),如果您发现没有找到行,请删除该客户。
iif(lkp_customer_key是null,dd_delete)
您也可以在源预选赛中使用左加入来执行此操作。
You need to create a logic ( like you said ) to delete from customer table. And its safer to either create a new pipeline in same mapping or a brand new mapping.
So, you will read customer_key from customer, do a lookup into transaction table(condition on customer_key), if you see no row found, delete that customer.
IIF ( lkp_customer_key is null, DD_DELETE)
You can do this using left join too in source qualifier as well.
DELETE上的大多数数据库服务器,它都会级联在各个表上的更新
most of database servers on delete, it cascade the update on respective tables