Groups | Blog | Home
all groups > sql server dts > december 2004 >

sql server dts : Populating a global variable.....


John Brian
12/22/2004 8:03:58 PM
How to populate a global variable by reading the data from a database.
Basically I want to find out the max date from a field and poulate the
variable.
SQL2K.
Thanks
Brian

Allan Mitchell
12/23/2004 7:00:30 AM
Use an ExecuteSQL task

Statement would be

SELECT MAX(whatever) as MaxValue FROM Table

Hit the Parameters button | Output Parameters | Row Value

In the grid at the bottom you can then map MaxValue to a Global Variable


--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


[quoted text, click to view]

John Brian
12/23/2004 8:01:41 PM
Thanks.
It helped.
John


[quoted text, click to view]

AddThis Social Bookmark Button