Conditional Split - Expression Evaluates to Null

Hi everyone!
I'm using a conditional split to discriminate modified records. My expression looks like this:
col1_source != col1_dest || col2_source != col2_des.....and so on. I use OLE DB Command afterward to update modified records.
It all works fine if no columns evaluate to null. If any (source or dest.) evaluates to null, component fails.
Any tips how to solve a problem?
It has to work like this:
If colX_source is null and colX_dest is not null --> Update
If colX_source is not null and colX_dest is null --> Update
If both colX_source and colX_dest are null --> No update
p.s. i apologize if a similar thread exists, I haven't found something of use to me.

Thank you both for a quick response.
I understood the derived column idea but not the isnull idea. 
If I want to cover all the cases in which I want the update to execute, my expression (if I haven’t missunderstood sth) should look like this: 
isNull(col1_source) && !IsNull(col1_dest) || !isNull(col1_source) && IsNull(col1_dest) || col1_source != col1_dest
Isn’t it true that again, the last part of the expression col1_source != col1_dest evaluates to null if one of the columns is null? And that the only solution to the problem is a derived column which transforms null values in “”?
I’m new to SSIS and slowly learning that programming logic is not always the SSIS logic.
 

Similar Messages

  • How to combine two conditions :  Exists and Item not null ?

    Hello !
    I have a flash chart region that I would like to display only if two conditions are both true.
    The first condition is this one :
    Exists (SQL query returns at least one row) :
    select 1
    from    observatoire.fiche aa, observatoire.activite_faite bb
    where   aa.fiche_id = bb.fiche_id
    and     bb.fiche_id = aa.fiche_id
    AND     bb.activites_id = TO_NUMBER(:P23_ACTIVITES_ID)
    AND     TRUNC(aa.date_activite, 'YYYY') = TRUNC(TO_DATE(:P23_ANNEE, 'YYYY'), 'YYYY')And the second condition would be :
    Item not null :
    P23_ACTIVITES_IDHow to combine these two conditions into one display condition ?
    Thank you .
    Christian

    Hello,
    The issue is that you're doing -
    TO_NUMBER(:P23_ACTIVITES_ID)When you leave the Null return value blank like that, you'll typically see '%null%' used in session state (i.e. it's not actually null). Obviously '%null%' can't be converted to a number, hence the error you're seeing.
    A simple solution would be to make your null return value -1 or some other value that is guaranteed not to be a valid id (and alternative is to convert the %null% to a real null via an App/Page process etc (if you search this forum you'll find a few examples on how to do that). Another alternative is to use a DECODE to detect the '%null%' etc.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Erron on Condition Split

    Hi guys, I'm using this expression as condition in a condition split
    Charindex(@[User::CurrentF],[Element Code]+'_'+ [Month] ) > 0
    but it returns an error 'Parsing the expression ........ failed. The single quotation mark at line number 1, character 44, was not expected.
    What's wrong?

    Arthur, I can set up this code:
    FINDSTRING([Element Code] + "_" + Month,@[User::CurrentF],1) > 0
    FINDSTRING([Element Code] + "_" + Month,@[User::CurrentF],1) == 0
    even if I set [Month], it returns always month. So I'm
    assuming the split doesn't work
    for this reason. I need to use another type of brackets in order to set the column month?
    Sorry didnt understand that.
    What is it that you're trying to implement? What does variable CurrentF contain?
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Expression​.Evaluate(​) - how to use it with propertyob​ject?

    Hi,
    I code in a process model callback and would like to evaluate an expression with the Runstate.Caller context.
    I found the method 
    Expression.Evaluate (
    evaluationContext, evaluationOptions = EvalOption_NoOptions)
    This is exactly what I need. However, if I have a CallingStep.Expr, which is a expression, I can't access the Evaluate() function. It is not available, only the PropertyObjects functions are.
    How can I cast it to be an Expression so I can access the function Evaluate?!
    I though I could do:
    Runstate.CallingStep.Expr.Evaluate(Runstate.Caller​, 0x0)
    This would return the expression evaluated in the caller context as a PropertyObject.
    But it's not the case, I'm missing something so TS know Runstate.CallingStep.Expr is an Expression... even if I add it to Watch panel, it shows it's an expression...
    Thank you.
    Solved!
    Go to Solution.

    I have an object of type Expression (from what I understand and from what the watch panel is showing) and I was expecting to be able to use the Evaluate() function.
    Expression.Evaluate(seqContext, options)
    But it seems that it's a propertyobject because only the function of this type are available.
    I've attached a screenshot. Thank you.
    Attachments:
    watchPanel.PNG ‏14 KB

  • SSIS Script Component Conditional Split to Flat File Destination

    I have a flat file which needs to be split into multiple flat files based on value in RecordType column. 
    For example, if (RecordType == 20), then direct all rows to a new text file, 
    I have around 15 different record types. I have managed to write some C# code for Conditional Split, but 
    still trying to figure out what is the next step to save these rows to a text file. 
    I will be grateful if someone please point me to the right direction.
    Many Thanks
    #region Namespaces
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
    using Microsoft.SqlServer.Dts.Runtime.Wrapper;
    using System.IO;
    #endregion
    [Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
    public class ScriptMain : UserComponent
    string copiedAddressFile;
    private StreamWriter textWriter;
    private string columnDelimiter = ",";
    private string filepath = @"C:\DestFiles";
    private string[] columns;
    public override void PreExecute()
    IDTSInput100 input = ComponentMetaData.InputCollection[0];
    columns = new string[input.InputColumnCollection.Count];
    for (int i = 0; i < input.InputColumnCollection.Count; i++)
    columns[i] = input.InputColumnCollection[i].Name;
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    if (Row.intRecordType ==20)
    Row.DirectRowToRecordType20();
    else if (Row.intRecordType ==10)
    Row.DirectRowToRecordType10();

    see similar example
    http://www.sqlis.com/sqlis/post/Using-the-Script-Component-as-a-Conditional-Split.aspx
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • [nQSError: 42015] Cannot function ship the following expression: Evaluate(

    Hi,
    I am getting the following error when using evaluate function
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 42015] Cannot function ship the following expression: Evaluate( TO_CHAR(%1),D907.c2) . (HY000)
    The syntax I had used in the column expression was
    EVALUATE('TO_CHAR(%1)' AS CHAR,"SA table"."Prior Quarter QTD Dollars")
    I am not sure why this is error is occurring because I have successfully used this syntax before. This is an example syntax I had used in another report and it is working well even now
    CAST(EVALUATE('TO_CHAR(%1,%2)' AS CHAR,ROUND(("table1"."QTD Actuals")/1000,0) ,'$9,999,999,999,999,990') AS CHAR)

    I had to use Case and CAST functions to achieve the same logic. I have raised a TAR with Oracle for this issue. Still waiting to hear from them. Using Case and CAST achieved the result but since there is a bug in 10.1.3.4.0 where download will fail if the query generated is more than 64kb, we are upgrading to 10.1.3.4.1.

  • How can I delete Conditional Build Expressions in RH7?

    I have a project with some Conditional Build Expression artifacts that I simply cannot get rid of.
    For example, I have created two Conditional Build Expressions:
    Internal OR Foo1
    Foo1 OR Foo2
    It has been determined that the second expression is the one we want.  But, the first one still shows up as an option in the SSL.  Furthermore, when I view a page, the first expression clutters up my list of possible Conditional Build Expressions.
    How can I lose a Conditional Build Expression?  I have quite a few possible arrangements, and I don't want to confuse other authors by having too many choices (especially with similar names).
    Kevin

    Hi Kevin.
    I think you have to do this by manually editing the project's .pss file (projectname.pss). If you take a backup of this file and open it in Notepad you'll find a [Global Build Tag Expressions] section and hopefully in there will be your "Internal OR Foo1" expression preceded with a date/time stamp. If you remove this line it should no longer appear in your project.
    Read the RoboColum(n) for a tips, tricks and musings on the Technical Communication Suite products.
    Follow the RoboColum(n) on Twitter

  • Cannot function ship the following expression: Evaluate

    hello
    i used a db function in rpd
    EVALUATE('X.F_REPLACE_NEG_VAL_TO_ZERO(%1)' AS DOUBLE PRECISION , "Stock"."Fact - Inventory"."Vol")
    the functions purpose is to put to zero the measure in case its <0
    when i use this measure in answers it works fine; however when i add a measure from another facts table into the report i get the following error:
    "Cannot function ship the following expression: Evaluate( X.F_REPLACE_NEG_VAL_TO_ZERO(%1),D902.c6) "
    this is a multifacts area, the dimensions used in the report are common for both facts tables (report runs fine with either measures from facts table 1 or from facts table 2); only error is when i put both measures together;
    i went through many threads here but could not find any solution that could be applied to above
    id appreciate any suggestions
    thanks
    rgds

    hello,
    i ran some more tests and apparently this is not related to this particular function i.e. even if i use
    evaluate('to_number'(1%)','column') it still throws an error
    can evaluate be used in multifacts areas?

  • Deleting conditional build expressions

    I have created a project in RH7 and it has expanded to become
    our company's single source for user documentation. This is a good
    thing. However, as I've added information for different audiences,
    I've ended up with a number of conditional build expressions that I
    no longer need. I'd like to delete them so I don't have to search
    through a long list on the WebHelp General screen.
    I've searched the forum and don't see any information about
    deleting conditional build expressions (tags, yes; expressions,
    no). Can anyone tell me how to do this?
    Thanks for your help!

    Dear Mr. Grange,
    Forgive me for resurrecting such an old post. In your reply you state: "any layout that contains the build expression). By 'layout' do you mean the topics?
    Thank you in advance for your assistance.

  • Can't Define Conditional Build Expression

    HI -
    I want to define a couple different Conditional Build
    Expressions to generate print and .chm output, but the Define
    button is dimmed. This feature was working for me a couple days
    ago, but now not.
    In my project I have used the conditional build tags for
    Printed, and in each of the topics where I used it, the red hash
    marks show in the topic - but when I open the conditional build
    tags pod, there is nothing there. Wierd.
    Hmm.. and now RH crashed for the 2nd time in 2 days -
    ugh......
    Any suggestions?
    thanks, Leisa

    Hi Leisa.
    Is this the same project with which you were having problems
    with yesterday? If so, try recreating the build tags exactly as
    they were (e.g. case sensitive) and you will be OK.

  • Jstl: ExpressionEvaluator.evaluate  versus  Expression.evaluate

    Hi,
    Reading the jstl API, I noticed the method ExpressionEvaluator.evaluate().
    On the other hand, ExpressionEvaluator also returns an Expression, which has its own evaluation method: Expression.evaluate().
    Isn't this redundant ? Which method would be used on which occasion ?
    Also, I was wondering: do I understand correctly, that one could override the ExpressionEvaluator ? So if I write my own evaluator, I could make it so that "${2+2}" evaluates to, say, "5" ?
    Thanks very much.

    Hi,
    Reading the jstl API, I noticed the method ExpressionEvaluator.evaluate().
    On the other hand, ExpressionEvaluator also returns an Expression, which has its own evaluation method: Expression.evaluate().
    Isn't this redundant ? Which method would be used on which occasion ?
    Also, I was wondering: do I understand correctly, that one could override the ExpressionEvaluator ? So if I write my own evaluator, I could make it so that "${2+2}" evaluates to, say, "5" ?
    Thanks very much.

  • Conditionally display items based on null LOV value

    Hello,
    I've seen several examples that do what I'd like to do but with different implementations. Perhaps someone can steer me in the right direction...
    I have a pop-up lov that pulls a list of names from various places. If, however, the name cannot be found I'd like to display a few text boxes where the user can enter a new name.
    For my list of values I have configured the following:
    Display Null: Yes
    Null Return Value: -1
    Null Display Value: Not Found
    My HTML Form Element Attributes has: onchange="doSubmit()";
    My Source section has:
    Source Used: Only when current value in session state is null
    Source Type: Static Assignment (value equals source attribute)
    My entry text boxes have a condition specified:
    Value of Item In Expression1 = Expression 2
    Expression 1: P4_LOOKUP_NAME
    Expression 2: -1
    I also have an unconditional branch to this same page (Page 4) that sets the value of P4_LOOKUP_NAME to P4_LOOKUP_NAME.
    I cannot seem to get this item to display though...any thoughts?
    Thanks in advance for your suggestions!

    jhammer,
    I like the concept. This would require a custom popup lov - something that can be a little tricky/time consuming the first time around. The popup lov would probably have to create new entries via Ajax to be able to pass back the correct ID/display values to the parent window on close.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Creation of change pointer for condition split

    Hi,
    We have  SAP  system which is integrated with PMM(mainly used for pricing).
    Scenario is as explained below.
    There is one condition record whose validity is from 25/12/2011 to End of TIme (EOT) for one price record.
    Assume today (08/02/2012) business created new condition whose validity is 08/02/2012 to EOT for another price.
    Now what happened is in condition table split happened one from 25/12/2011 to 07/02/2012 and one more from 08/02/2012 to EOT.
    But we observed that while sending the information to PMM system through idoc system is not sending the condiion record 25/12/2011 to 07/02/2012.
    *Now question is whether this is SAP standard functionality (not to send Past validity records) or it is custom change specific to company
    .*Assume user creates conditon record whose validity is from tomorrow (09/02/2012) to EOT then split happens like 25/12/2011 to 08/02/2012 (which is today) and 09/02/2012 to EOT.
    In this case idoc sends both the condition record as 08/02/2012 is today and not in the past.
    Thanks and Regards
    Raghavendra Pai

    FYI... While pricing condition determination in sales order will refer the pricing value from condition record (with proper validity) based on pricing date.
    Say, you condition record for base price as PR00.
    Rate
    UoM
    Valid from
    Valid to
    100
    per EA
    01.01.2011
    31.01.2011
    120
    per EA
    01.01.2012
    31.01.2012
    Now you are creating a sales order on 09 Feb 2012. But the pricing date is 21.12.2011.
    Then system will copy pricing as 100 instead of 120.
    This example practical happens when you create sales order with reference to contract or quotation.
    Now, in SAP PMM, I hope you are maintaining condition records through Idoc or may be real sync, then you should have provision for accommodate, these change in pricing and validity.
    Now question is whether this is SAP standard functionality (not to send Past validity records) or it is custom change specific to company
    Now it totally depends on your/client organization/business process requirement.
    I hope this can assist you in understanding. If you have any further concern or doubt, do revert back
    Regards
    JP

  • Help with conditional build expressions

    I'm using RoboHelp HTML and creating WebHelp Pro layouts. I
    want to create five (or more) different versions of the Help tool
    for our various groups of users.
    Here's what I'd like to do: Create a conditional build tag
    for each of the versions (i.e. each of our groups of users). I
    could name them as follows:
    group1
    group2
    group3
    group4
    group5
    Then, I would associate each topic with one or more of the
    build tags. For example, topic1 may be for group1 and group2;
    topic2 may be for group1 and group4. Etc.
    The problem is thus: When I want to create the version for,
    say, group1, my expression ends up excluding the other groups. In
    the end, this omits any topics associated with group1 that are also
    associated with the other build tags (i.e. the other groups).
    Is there an expression I can use to prevent these topics from
    being omitted? Perhaps the use of parentheses?
    The only solution I've used is tedious: I create many build
    tags--one for each variation. For example, I'd have a
    group1group2group3 build tag, a group1group3 build tag, a
    group1group4 build tag, etc. Then, I just associate one build tag
    with each topic. When I'm creating a version for group1, for
    example, I'd just include all topics with a build tag that includes
    group1 (e.g. group1, group1group3, group1group2group3, et. al.). I
    omit the others (e.g. group2group3, group2group4,
    group2group3group4group5...et. al.).
    As you can imagine, this solution is problematic. First, I
    have to create and keep track of many many build tags. Then, if I
    want to create another version of Help, I need to change all the
    build tags to include this new group.
    I'm sure there must be a better build tag expression for what
    I'm trying to accomplish. Please help! Thanks!

    There is indeed an expression! Unfortunately, the option is
    normally hidden, so it can be tricky to find. Here's what you do:
    1. Define the build tags.
    2. Apply them to your topics. OVERLAPPING IS ENCOURAGED! That
    is to say, you can assign tag1, tag2, and tag3 to a single topic.
    3. Right-click the desired layout and select Properties.
    4. Click the Define button to the right of the Conditional
    Build Tag drop-down menu. The Define Conditional Build Tag
    Expression dialog will appear.
    5. Click the Advanced button. The Advanced area will appear
    at the bottom of the dialog.
    6. Select a tag from the Available Conditional Build Tags
    drop-down menu.
    7. Click the Add Tag button. The selected tag will appear in
    the Conditional Build Tag Expression display window.
    8. Click the AND button.
    9. Select another tag from the drop-down menu.
    10. Click the Add Tag button.
    11. Repeat steps 8-10 for each tag you wish to add to the
    expression.
    12. Click the OK button to close the dialog.
    13. Click the Save button to save your layout with the new
    build expression.
    That's it! The trick is to use the ADVANCED button in the
    Define Conditional Build Tag Expression dialog. Doing so allows you
    to build inclusional expressions rather than exclusional
    expressions, so you can avoid the hassle you described in your
    post. Using this method, I defined two build tags (A and B) and
    applied them to three topics as follows:
    * Topic 1: Tag A
    * Topic 2: Tag B
    * Topic 3: Tags A and B
    I then defined an expression that simply included tag A. When
    I compiled my help, topics 1 and 3 appeared in the output, but
    topic 2 did not.

  • Conditions: SQL Expression vs. PL/SQL expression

    In a Condition, what is the difference between a SQL Expression and a PL/SQL expression? The examples shown when creating, say a validation show similar things
    example of pl/sql expression: to_char(sysdate,'d')=1
    example of sql expression: instr(...) > 0
    Arent the 2 expressions above similar? What makes one a sql expression and other a plsql expression?
    Thanks

    Thanks, but I think its more than a matter of documentation.
    I had a SQL expression like
    :REQUEST IN ('button1','button2') AND NOT pkg.fn
    where pkg.fn is, of course, a packaged function returning BOOLEAN.
    The process that this condition was attached to was just not firing. No errors, nothing. I was ready to tear my hair out! I changed the expression type from SQL to PL/SQL and everything was fine.
    I think there should be a check in the App Builder for this kind of thing so that such invalid conditions are not allowed to be created.
    Thanks

Maybe you are looking for

  • How much RAM should I get?

    Okay -- I have been using an iBook g.4 1.33 GHZ since mid-2005. I think it's time I got a new Apple product, and I have settled on the MacBook Pro 13 Inch 2.26 GHZ that would come with 2 GB of RAM. I am wondering two things. 1) Since Apple charges to

  • Error when exporting HD video in CS3

    I need help figuring out why I get errors each time I try to export my video in Premiere Pro CS3. It worked a few days ago for my rough cut, but now is not working for my fine cut. I wonder if it is simply because of my machine's capabilities in work

  • Redirect from page within one site to an entirely new site?

    Hi folks, I have created a new website: http://wakatipucollection.co.nz as a replacement for a page I had been hosting at http://arrowmark.co.nz/clients At the Arrowmark site I have updated the menu bar and text links to take visitors to the new stan

  • Advanced Searching  - Multiple Menu/List/Radio Button Criteria

    Hi All, I am looking for a dreamweaver and/or PHP/MySQL tutorial and/or extension and/or tool that can walk me through creating an advanced search page. For example, I have multiple search criteria which allow users to select various criteria: Menu/l

  • Why do we need to log in to use CS6 ???

    Hello all, I do some assistant editing at a film company and we have two suites of CS6 installed at work on two different computers. We also have the Adobe Creative Cloud now as well. I understand we need to log in to use softwares in the Creative Cl