Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
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)
}
Posted
Updated 12-Sep-14 20:10pm
v2
Comments
George Jonsson 12-Sep-14 2:06am    
So where are you stuck?
10923679 13-Sep-14 1:34am    
i have got the solution..

well i am stuck in a new place now...

i want to know how to read each row from a table and compare with matching fields with another table is amount is same or less then update that particular row.


just have a look in this.. You will get an idea .

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
George Jonsson 13-Sep-14 1:53am    
Can you please use the 'Improve question' widget and update your question with this code and also format it properly.
10923679 13-Sep-14 2:05am    
i dont have code...

i am not getting an idea how to start it.
so i am here to get an idea hot to start it..
10923679 13-Sep-14 2:08am    
How Do I Read Each Row From A Table And Compare With Another Table, if the matching fileds amount is less or same with another table then it will update that single row.

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900