October 23, 2013 at 6:44 am
Hello there,,
i got a variable which is an Expression.
my expression is this:
'||'''DateVar'''||'
i got another variable which is the DateVar and looks like :
02/07/2013
i want to populate the expression and to get this expression:
'||''02/07/2013'''||'
when im trying to do that like this:
'||''@[user::DateVar]'''||'
i dont get what i need....(i doesnt treat the variable as a variable but as a text)
i think i should use an escape character...
can someone help plz?
thank you
October 23, 2013 at 6:55 am
avishain (10/23/2013)
Hello there,,i got a variable which is an Expression.
my expression is this:
'||'''DateVar'''||'
i got another variable which is the DateVar and looks like :
02/07/2013
i want to populate the expression and to get this expression:
'||''02/07/2013'''||'
when im trying to do that like this:
'||''@[user::DateVar]'''||'
Dont't use the single quotes.
"||" + @[user::DateVar] + "||".
I assume @[user::DateVar] has the string data type. If not, you need to add a cast.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 23, 2013 at 7:07 am
thank you very much,
but i have to keep this format since i execute this string via EXCECUTE SQL TASK ( i send it to an oracel DB to run a "PACKAGE" (stored procedure)
so i have to keep this format in order to run it in the oracle...
October 23, 2013 at 7:09 am
avishain (10/23/2013)
thank you very much,but i have to keep this format since i execute this string via EXCECUTE SQL TASK ( i send it to an oracel DB to run a "PACKAGE" (stored procedure)
so i have to keep this format in order to run it in the oracle...
If you want some decent help, you'll need to give more information.
How does the entire query need to look like?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 23, 2013 at 7:19 am
the first pic is the query that runs inside the oracle .
the second is how it should be in the ssis
i need to replace all the dates in that query to variables...
cause i want it to be dynamic
October 23, 2013 at 12:51 pm
Just make sure that each part of the query that is not dynamic is a string properly enclosed with double quotes.
The variables need to be concatenated to the strings using +. Make sure those variables are either strings or casted to strings.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply