Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts

Monday, March 19, 2012

i want a function like ifNull function to use in expression builder

Hi,

I wonder if there a function that i can use in the expression builder that return a value (e.g o) if the input value is null ( Like ifnull(colum1,0) )

i hope to have the answer because i need it so much.

Maylo

dont know if understood very well...

but....

You can use the function IIF(condition, TRUE, FALSE)

And can use IsEmpty function...

explain better!

Regards!

|||

Maylo wrote:

Hi,

I wonder if there a function that i can use in the expression builder that return a value (e.g o) if the input value is null ( Like ifnull(colum1,0) )

i hope to have the answer because i need it so much.

Maylo

Have you even opened up the expression builder in SSIS? Have you looked at the list of available functions on the right-hand side? Specifically the "NULL Functions" folder?

To answer your question, use: ISNULL(expression)

|||

i try IIF(condition, TRUE, FALSE) and it said that IIF is not recognized ,

let me more clear in explaination

iam using Conditional Split Component and i want to be in its condition some like that Condition

( ( case ColumnX is null then zero else then ColumnX ) ==ColumnY )

then underline part is what i want to translate to a right experision to be used in the Conditional Split Component cases.

i hope you can help me soon

Best wishes

Maylo

|||

Maylo wrote:

i try IIF(condition, TRUE, FALSE) and it said that IIF is not recognized ,

let me more clear in explaination

iam using Conditional Split Component and i want to be in its condition some like that Condition

( ( case ColumnX is null then zero else then ColumnX ) ==ColumnY )

then underline part is what i want to translate to a right experision to be used in the Conditional Split Component cases.

i hope you can help me soon

Best wishes

Maylo

Yeah, Pedro wasn't on the right page for SSIS expressions.

This is what you want:

ISNULL([ColumnX]) ? 0 : [ColumnX]|||

Yeah you are right, I was thinking in SSAS...

Sorry... I was sleeping! :-)

Regards!

|||Wink , ok any one know it in the SSIS

Sunday, February 19, 2012

I need help ASAP with SSRS Date Expression

I have a report which has a date like 01/05/2007 for a bill date in on Column I have todays date in another column I have a tird colum which need the total number of days from date of the billed date. I need to create and expression which will take the current date and subtract the number of days from todays date and give a total number of days. How do I get thew current date in the expression.

the billed date expression is =FormatDateTime(Today()) - FormatDateTime(Fields!BILLDATE.value,2) I can not get this to work

Any help would be appreciated

Hey,

you can try something like this:

privateint GetDaysBetweenDates(DateTime firstDate, DateTime secondDate)
{
return secondDate.Subtract(firstDate).Days;
}

Hope this helps.