Problem with pulling data from CSV based on condition split transform

Posted on 2011-04-20
Medium Priority
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
  • 2
LVL 13

Expert Comment

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

Expert Comment

by:Chris Mangus
ID: 35437325
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:  http://msdn.microsoft.com/en-us/library/ms141061.aspx
LVL 17

Accepted Solution

Chris Mangus earned 1500 total points
ID: 35437346
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

ID: 35749709

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

862 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