Skip to Content
0

how to create new BODS job below the script?

Nov 03, 2016 at 04:54 AM

42

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Murali Krishna Nov 03, 2016 at 09:45 AM
0

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

Thanks,Murali

Share
10 |10000 characters needed characters left characters exceeded
kris k Nov 03, 2016 at 09:56 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Denise Meyer
Nov 03, 2016 at 02:37 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded