Migrating from SAP SQL Anywhere to SQL Server 2022 Standard

  • 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”

  • 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.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply