question

pradnyag41 avatar image
pradnyag41 asked

In memory table -Update from clause

Hi, We are looking for in memory migration in sql 2016 version. We have a procedure where there is update from clause if used. How to handle this in nativelycompiled procedures.
memoryoltpin
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@pradnyag41 Because natively compiled procedures do not support **update from**, you will have to resort to using the TVP which can be passed as a read-only parameter to the procedure (after you populate the instance with needed records). Inside of the procedure, you will have to, with utmost humility, wheel out the ***WHILE*** loop and update the data in your table on the row-by-agonizing-row (a.k.a. RBAR) basis. I know that this is disgusting, as it goes against the set-based principals of T-SQL, but unfortunately, it appears to be the only way out at this time. Please provide some details (perhaps the original update statement), so I or someone else can type up a script which will do the trick.
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.