从sql中的子表的父表中获取数据 [英] Get Data from Parent table of child table in sql
问题描述
大家好,
我的DataBase中有两张桌子
1)PaymentMaster < br $>
2)DailyCollectionMaster
在PaymentMaster我有
FinceID - Bigint
PartyID - Bigint
AcId - Bigint
金额 - 浮动
日期 - 日期
在DailyCollectionMaster
DailyID - Bigint
PartyID - Bigint
AcId - Bigint
CollectionDate - date
金额 - 浮动
现在在SQL端我在支付主数据中插入一次数据并根据支付金额高手
i在DailycollectionMaster中插入每日记录。
如果在任何日子里没有在DailycollectionMaster中插入记录。
如何找到未插入哪一方记录DailyCollection ....
谢谢和问候
Hello to all,
I have two table in my DataBase
1) PaymentMaster
2) DailyCollectionMaster
In PaymentMaster I have
FinceID - Bigint
PartyID - Bigint
AcId - Bigint
Amount - float
Date - Date
In DailyCollectionMaster
DailyID - Bigint
PartyID - Bigint
AcId - Bigint
CollectionDate - date
Amount - float
Now on SQL Side i inserted data once in payment master and according to amount of payment master
i inserted daily records in DailycollectionMaster.
IF Record is not inserted in DailycollectionMaster in any Days.
How i can find which party record is not inserted in DailyCollection....
Thanks and Regards
推荐答案
请参阅没有EXISTS的子查询 [ ^ ]并自行制定解决方案。
从上述评论中提示。
Refer to Subqueries with NOT EXISTS[^] and work out the solution yourself.
Take hint from the above comments.
这篇关于从sql中的子表的父表中获取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!