The following question is now considered abandoned, please attend to it:
http://www.experts-exchang
Main Topics
Browse All TopicsI have a dts pkg
I have 4 global variables
Name Type Default Value
------ ---------- -------------------------
gv1 String v:\mytopdirectory\
gv2 String 200610\
gv3 String wkbkname.xls
gv4 String blank
I have a dynamic properties task.
I want to assign global variable gv3 using a query and gv4 using gv1, gv2 and gv3 as follows:
select gv3 = select cast(year(dateadd(mm, 4, getdate())) as char(4)) + case len(cast(month(dateadd(mm,
select gv4 = gv1+gv2+gv3
In a subsequent ms excel connection, I want to use gv4 as set in the dynamic property.
I need examples and support documentation.
Thank you,
Sami
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The following question is now considered abandoned, please attend to it:
http://www.experts-exchang
"You need to use Active X Script task to do that:"
====
Thank you for the activeX script information. I was hoping for a solution that used a SQL Query similar to what I listed in the question.
I guess part of the question should have been:
Can this be done with at sql query rather than an ActiveX script?
If so, how would the sql query look.
Thank you,
Sami
I am surprised I received only one response to this question.
I am also surprised it has been considered abandoned after only 5 days, 3 of which were weekend and holiday.
>>This is not abandoned. I was out for the holiday and one additional day after the weekend.<<
I believe there is some confusion here, I am referring to the folowing question:
08/11/2006 500 How can I store .85 as .85? Float data t... Open Microsoft SQL Server
http://www.experts-exchang
The last activity in that thread occurred over 21 days ago and therefore is now considered abandoned. See the EE Guidelines:
What happens if I don't close my question?
http://www.experts-exchang
>>Can this be done with at sql query rather than an ActiveX script?<<
Yes, you can use an Execute SQL Task to accomplish this.
>>I am surprised I received only one response to this question.<<
You will find experts more responsive, if you take the time to keep up with your open questions.
Here is how you would do it with a Execute SQL Task.
1. Create an Execute SQL Task.
2. Set the Existing Connection to an existing SQL Server Connection.
3. In the SQL Statement enter:
select cast(year(dateadd(mm, 4, getdate())) as char(4)) + case len(cast(month(dateadd(mm,
Or if you prefer something a tad more concise:
Select CONVERT(char(6), DATEADD(Month, 4, GETDATE()), 112)
4. Click on Parameters ...
5. Select the Output Parameter tab
6. Select the Row Value option
7. Select the gv3 global variable in the Output Global Variables column.
8. OK.
9. OK
10. Add appropriate workflow.
Business Accounts
Answer for Membership
by: Mr_PeerapolPosted on 2006-09-01 at 12:49:55ID: 17439485
You need to use Active X Script task to do that:
Function Main()
DTSGlobalVariables("gv3") = ... VB Script here with ....
DTSGlobalVariables("gv4") = DTSGlobalVariables("gv1") & DTSGlobalVariables("gv2") & DTSGlobalVariables("gv3")
Main = DTSTaskExecResult_Success
End Function
> getdate() = Now() in VB
> Use & to concatenate strings.
> Other functions are the same.