Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Create a Variable in SSIS - How TO

$
0
0

If I open SSMS and enter

@vTRANSGUID = NEWID()

I get a GUID.  How to I enter this in SSIS as an Execute SQL task and write the output to a variable that I can use in another part of the package?

I have created a variable in the variables pane called vTransGUID with data type string

I have tried lots of things and can't get the variable to hold the GUID information.  There are lots of things online for putting variable in but not much that shows how to write to variables.

I have tried Reult Set Single Row and Full set with the Result Set as vTransGUID - Result Name and User::vTransGUID - Variable Name but I get a red cross also tried adding a Parameter to is but no joy. 

Any help appreciated.


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>