Problem with pulling data from CSV based on condition split transform

Posted on 2011-04-20
Last Modified: 2012-05-11
Hi experts,
I am using the following conditions to extract data from a csv file, please find attached the screen shot of the conditions in the condtiional transformation editor but it is missing out getting one record from the csv file(it is loading all the records with the below conditions except one record) and I am guessing something to do with the condition.
LEN([Merchant Reference Number]) <= 10 && Applications == "Credit Card Settlement(Accept)"
LEN([Merchant Reference Number]) <= 10 && Applications == "Credit Card Credit(Accept)"
I want to load records which definitely should have LEN([Merchant Reference Number]) <= 10  and Applications == "Credit Card Settlement(Accept)" or "Credit Card Credit(Accept)"
Is my above conditions wrong then, should I put it some other way?

Question by:sqlcurious
    LVL 13

    Expert Comment

    what are the values of the merchant reference number and applications column  for the record that gets missed.
    LVL 17

    Expert Comment

    Try this:

    LEN([Merchant Reference Number]) <= 10 && (Applications == "Credit Card Settlement(Accept)"
    ||Applications == "Credit Card Credit(Accept)")

    Note that the characters between Settlement and Credit are a logical OR condition.  Review this at:
    LVL 17

    Accepted Solution

    Disregard my comment.  You're doing Conditional Split.

    Both of your conditions look good to me.  That being the case I would suspect that the row you're not able to import has a length longer than 10 and you aren't seeing it in the data because it may have leading or trailing blanks.  I'd examine the data and see if this is the case.

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    In this article—a derivative of my blog post (—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now