如何从表中读取每一行并与另一个表进行比较(如果匹配)则更新该行 [英] How do I read each Row from a Table And Compare With Another Table if matching then update that single row
本文介绍了如何从表中读取每一行并与另一个表进行比较(如果匹配)则更新该行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
读一行 表 \\ templyee_table company_table
匹配(类似)
EmpID,名称,金额_ID 和年
检查 数量 每行 相同匹配EmpID,Name,Amount_ID 和年份不超过 company_table 金额
如果金额超过company_table ..(如果 e.amt> c.amt)
{
validatiion - 该行将不 更新
}
其他
如果 employee_table 的数量相同company_table( if e.amt = c.amt)
{
update that特定行 into (company_details_table)
}
else
如果 employee_table 相同的company_table(< span class =code-keyword> if e.amt< c.amt)
{
update 该特定行< span class =code-keyword> into (company_details_table)
}
解决方案
你为什么发帖同样的问题两次?
我如何从表中读取每一行并与另一行进行比较表Asp.Net(Csharp) [ ^ ]
我的答案是一样的。
Read one row of table emplyee_table with company_table
matching(similar)
EmpID, Name , Amount_ID and year
check the "amount" of each row having same matching EmpID, Name , Amount_ID and year doesnt exceed with company_table "amount"
if the amount of employee_table exceed company_table.. (if e.amt>c.amt)
{
validatiion- that row will not update
}
else
if the amount of employee_table is same company_table (if e.amt=c.amt)
{
update that particular row into (company_details_table)
}
else
if the amount of employee_table is same company_table (if e.amt<c.amt)
{
update that particular row into (company_details_table)
}
解决方案
Why do you post the same question twice?
How Do I Read Each Row From A Table And Compare With Another Table In Asp.Net(Csharp)[^]
My answer is the same.
这篇关于如何从表中读取每一行并与另一个表进行比较(如果匹配)则更新该行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文