Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello dears
i devlope a web application and i have database that own many tables and i want to get data from one table and update return value in the same time ...( when select row update sepcifc field to new value ) that is i mean ......... any idea for doing it ... i think must to using stored prosdure to do this but how ... i work with command type text not stored and if i must to use stored procedure can you tell me an example
Posted
Comments
ZurdoDev 28-Nov-14 19:26pm    
What exactly is your question? I don't understand what you are saying.
beljk 29-Nov-14 3:04am    
i want to select data from employee table and when data returned i want to updated it but in the same time ( my be 2000 row returned , when first row returned , update employee_Status then complete loop second row returned , update employee_Status ....... ETC

 
Share this answer
 
Use Merge Statement
you can perform insert, update, or delete operations in a single statement using the MERGE statement
 
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