Greetings once again SQL friends,
Sorry to bug you with my silly questions but this little problem has been driving me crazy for the last hour or so!
I am attempting to change the data type of a variable in an expression but I keep getting an error saying that the expression can not be evaluated.
The syntax I am using is as follows :
(dt_str) @.[User::MAX_OFFER_PRICE_ID]
My variable MAX_OFFER_PRICE_ID is type int32 and I am attempting to cast it as a string.
What am I doing wrong?!
Thanks for your help in advance.
Try,
(dt_str, 6, 1252) @.[User::MAX_OFFER_PRICE_ID]
If you're using the expression builder then expand "Type Casts" in the top right hand corner and you'll see the required syntax.
-Jamie
|||
Hi Jamie,
You are my SSIS hero now
Thanks very much mate.
|||Hi Jamie,
Just wondering, if I want to use retrieve another value from a different table, would I have to create yet another SourceSQL variable?! I am trying to think of a method that would allow me to re-use the sqlSource rather than create a new one.
My initial thoughts (after some reading) is to use a configuration file but I have not figured out the finer details of this solution.. God help me!!
Have you come across this kind of thing before? Do you have any suggestions?
Please forgive me for pestering you with my questions but I am eager to learn as much as I can about this great tool. As much as I am annoyed (for spending ages tryi8ng to work out simple thigs), I am even more determined to learn more about this beast of a tool.
Thanks for all the advice.
|||You say "yet another SourceSQL variable" as if its a bad thing :)
If you need to extract data from a different table then create another variable - no problem with doing that.
-Jamie
|||
Hello there,
I have read your questions and i must say that i sympathize with you alot!!!
I have spent hours trying to figure out the logic behind the syntax and i must say that even though the examples appear simple in books online, they become complex to decipher when I start to get these error messages from the parser.
would you be able to share with me some of the simple syntax logic behind these expressions?
Thank you!!
|||The syntax will likely appear familiar to C programmers, as the grammar is similar to the C language. Beyond that, the books online has a pretty good reference.
If you run into any specific errors that perplex you, please do post the expression and the error message on these forums. Most likely someone will be able to help you, and furthermore it will help the SSIS team identify cases where the error messages are not as helpful as they should be.
Thanks
Mark
No comments:
Post a Comment