September 29, 2015 at 8:48 am
i design SP for insert data in 2 tables
i need to store list of array in one parameter to complete my query
i try the table value but it`s not good for me because table value is readonly and i need to insert data with list of array ..........
September 29, 2015 at 9:25 am
Use the table-type parameter, that's the point of that data type.
It's read-only within the proc that it's passed to, if that's a problem you can always create a table variable or temp table, insert the data from the parameter into the table variable or temp table and do further manipulation on that.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 29, 2015 at 9:39 am
aymanahmed88 (9/29/2015)
i design SP for insert data in 2 tablesi need to store list of array in one parameter to complete my query
i try the table value but it`s not good for me because table value is readonly and i need to insert data with list of array ..........
Gail's suggestion is excellent when the call is made from SQL code, where is the call to the procedure coming from?
😎
September 29, 2015 at 10:42 am
Eirikur Eiriksson (9/29/2015)
aymanahmed88 (9/29/2015)
i design SP for insert data in 2 tablesi need to store list of array in one parameter to complete my query
i try the table value but it`s not good for me because table value is readonly and i need to insert data with list of array ..........
Gail's suggestion is excellent when the call is made from SQL code
Or .Net
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 30, 2015 at 1:49 am
call from MVC
September 30, 2015 at 7:37 am
We populate Table Valued Parameters from within MVC.
I'm not a C# developer so can't help you with specifics,
but our c# developers populate from the app which is MVC based.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply