February 6, 2024 at 6:36 am
Good day
We are in the progress of migrating SAP SQL Anywhere to SQL Server 2022 Standard.
However, we have encountered numerous cases where the stored procedures pass a calculation as a parameter, e.g.
Declare @Par INT = 10, @ReturnValue INT = NULL;
/* a lot of calculations and variable assignment happening in this block*/
exec @ReturnValue = [dbo].[TheProc] @a = 1, @b = (-1*@Par), @c=0
This is causing a bit of a stumbling block.
I do know one way to address this is to create a variable and populate it with the result of this calculation and pass that variable as a parameter
However, this is quite daunting, given the number of procedures that use this.
Any advice in this regard would be appreciated.
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
February 6, 2024 at 8:34 am
I do know one way to address this is to create a variable and populate it with the result of this calculation and pass that variable as a parameter
As far as I know, that is the easiest option in this case. Seems like you're in for some 'fun', I sympathise.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy