Skip to Content

how to create new BODS job below the script?

INSERT INTO @sysVars

SELECT SysVarDesc

, SysVarString

FROM Coupon.dbo.SysVariables sv with (nolock)

WHERE SysVarName = 'PFI' + @kitSKU

IF (SELECT COUNT(*) FROM @sysVars) > 0

BEGIN

SELECT TOP 1 @promotionId = SysVarString FROM @sysVars WHERE SysVarDesc LIKE '@promotionId'

SELECT TOP 1 @SponsorNumber = SysVarString FROM @sysVars WHERE SysVarDesc LIKE '@SponsorNumber'

SELECT TOP 1 @OrderTypeID = SysVarString FROM @sysVars WHERE SysVarDesc LIKE '@OrderTypeID'

SELECT TOP 1 @OrderCode = SysVarString FROM @sysVars WHERE SysVarDesc LIKE '@OrderCode'

SELECT TOP 1 @BatchID = SysVarString FROM @sysVars WHERE SysVarDesc LIKE '@BatchID'

END

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 03, 2016 at 09:45 AM

    take "Sql Transformation" and copy this script in to that transformation

    Thanks,Murali

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 03, 2016 at 09:56 AM

    Hi Murali,

    I checked this part (SELECT SysVarDesc

    , SysVarString

    FROM Coupon.dbo.SysVariables sv with (nolock)), it is working in sql transform.

    But i want write these statements in Query transform

    SELECT TOP 1 @promotionId = SysVarString FROM @sysVars WHERE SysVarDesc LIKE '@promotionId'

    SELECT TOP 1 @SponsorNumber = SysVarString FROM @sysVars WHERE SysVarDesc LIKE '@SponsorNumber'

    SELECT TOP 1 @OrderTypeID = SysVarString FROM @sysVars WHERE SysVarDesc LIKE '@OrderTypeID'

    SELECT TOP 1 @OrderCode = SysVarString FROM @sysVars WHERE SysVarDesc LIKE '@OrderCode'

    SELECT TOP 1 @BatchID = SysVarString FROM @sysVars WHERE SysVarDesc LIKE '@BatchI

    please let us know..

    Regards,

    krish.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 03, 2016 at 02:37 PM

    You can set this up as a Stored procedure in your database and just call it from data services in a script or sql transform.

    Thanks,

    Denise

    Add comment
    10|10000 characters needed characters exceeded