Link to home
Start Free TrialLog in
Avatar of Dominic34
Dominic34Flag for Canada

asked on

iterate through a table valued parameter in SQL 2008

Hi,
  I created a user-defined table type in SQL Express 2008 and a StoredProc that will receive the data type from a .net application. The table the SP will receive will contains rows that need to be updated, inserted or, if missing, deleted from the SQL table it refers. So, I need to iterate through the table parameter to know if I have to update, insert or delete the rows in the table. So, how can I do that? with a cursor?

To give you a better understanding, the .net application retrieves an image of the SQL table, put it in a datatable, manipulate the data and send them back to SQL. So, rows can be updated, inserted or deleted.

thanks for your help!
ASKER CERTIFIED SOLUTION
Avatar of dwkor
dwkor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dominic34

ASKER

wonderful!! it works like a charm!!

I didn't knew this instruction! really usefull!!

thanks!!