Wednesday, March 7, 2012

Question on derived column expression

Hi, all experts here,

Thank you very much for your kind attention.

I am having a question on derived column expression. The expression I am trying to use for the derived column is as below (column1 is a numeric data type column):

case

when column1<0 then 'yes'

else 'no'

end

But I got the error message though, would please any experts here give me any advices on the expression I used? What is wrong with the expression I used above?

Thank you very much and I am looking forward to hearing from you shortly.

With best regards,

Yours sincerely,

column1 < 0 ? "yes" : "no"

That's the correct format for SSIS expressions.|||

What error message are you getting, and where exactly are you trying to do this? If it is in an Execute SQL task or and OLE DB source, that syntax should work. If it is in the Derived Column transform, you need to use something like (freehanding):

Code Snippet

[column1] < 0 ? "yes", "no"

|||

Hi, Phil,

Thanks a lot and would you please kindly advise me if there is any SSIS expression reference?

With best regards,

Yours sincerely,

|||

Helen999888 wrote:

Hi, Phil,

Thanks a lot and would you please kindly advise me if there is any SSIS expression reference?

With best regards,

Yours sincerely,

You can search around here a bit to find examples and such, but you can use Books Online. SSIS expressions are derived from C/C++.

http://msdn2.microsoft.com/en-us/library/ms140206.aspx|||

Hi, Jwelch,

Thank you, yes, the expression i used was in the derived column transform.

Where could I actually find the SSIS expression reference?

Thanks and I am looking forward to hearing from you shortly.

With best regards,

Yours sincerely,

|||Both of the currently available books on SSIS (Professional SQL Server Integration Services and Microsoft SQL Server Integration Services) include information on expressions.|||

Hi, Jwelch,

Thanks a lot.

With best regards,

Yours sincerely,

No comments:

Post a Comment