I have a problem setting some variables in a package using the /SET option of dtexec. Specifically when the value I want to set contains a semi-colon. I get an error like:
Argument ""\Package.Variables[User::Delim].Properties[Value];^;"" for option "set" is not valid.
I am guessing that I will have to escape the semi-colons somehow, but with what?
Regards, Lars |
| lasa Wednesday, January 25, 2006 1:04 PM |
The above did not work when the string contained spaces. The following has yet not failed though:
dtexec /SET \Package.Variables[User::TheVariable].Properties[Value];\""; space"\"
Regards, Lars |
| lasa Tuesday, February 07, 2006 12:51 PM |
You don't show the command but from the error it looks like
/set "\Package.Variables[User::Delim].Properties[Value];^;"
instead try
/set "\Package.Variables[User::Delim].Properties[Value]";"^;"
This puts the semicolon separator outside the quotes and may allow DTExec to process the argument.
HTH,
Matt |
| Matt David Wednesday, January 25, 2006 5:01 PM |
Matt,
I am afraid that didn't work either. Any other ideas of how to pass a string containing semi-colons to dtexec using the command line?
This is the output:
H:\>dtexec /SET "\Package.Variables\[User::TheVariable].Properties[Value]";"^;" Microsoft (R) SQL Server Execute Package Utility Version 9.00.1399.06 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
Argument ""\Package.Variables\[User::TheVariable].Properties[Value];^;"" for opt ion "set" is not valid.
H:\>
Regards, Lars |
| lasa Thursday, January 26, 2006 9:15 AM |
Sorry I should have been more explicit in my posting. You should try:
dtexec /SET "\"\Package.Variables\[User::TheVariable].Properties[Value]\";\"^;\""
The command interpreter strips quotes so the command I showed previously was what DTExec would work with but you have to escape the quotes so that they get to the DTExec parser. The above shows the actual command line with all the escaping.
HTH,
Matt
|
| Matt David Monday, January 30, 2006 6:11 PM |
The following turned out to be the proper syntax:
dtexec /SET \Package.Variables[User::TheVariable].Properties[Value];\"^;\"
Regards, Lars |
| lasa Monday, February 06, 2006 12:18 PM |
The above did not work when the string contained spaces. The following has yet not failed though:
dtexec /SET \Package.Variables[User::TheVariable].Properties[Value];\""; space"\"
Regards, Lars |
| lasa Tuesday, February 07, 2006 12:51 PM |
I need to pass a parameter to Package, parameter will contain a Date type.
The syntax that i am using is
Dtexec /File "Package.dtsx" /Set \Package.Variable[User::The Variable].Properties[Value]
But it certainly seems is not fine.
Could anyone advice on this ?
|
| Athar.Iqbal Wednesday, November 14, 2007 5:43 AM |
You don't have a value specified. Try:
Dtexec /File "Package.dtsx" /Set \Package.Variable[User::The Variable].Properties[Value];"01/01/1900" |
| jwelch Wednesday, November 14, 2007 9:49 PM |