Conditional Split
I am using a conditional split to evaluate the condition below. It should only send records to my SQL Server database if the PatientZip matches one of the eight below and the PatientCity is not Wichita Falls (you wouldn't believe how bad this is mispelled sometimes). I checked the output table and it has all records for the zipcodes below both matching and non-matching the cityname of Wichita Falls. The table should not have entries for records with the cityname of Wichita Falls. Do I have the code correct or could I have missed something? LTRIM(PatientCity) != "Wichita Falls" && (PatientZip == "76301" || PatientZip == "76302" || PatientZip == "76305" || PatientZip == "76306" || PatientZip == "76307" || PatientZip == "76308" || PatientZip == "76309" || PatientZip == "76310")
August 24th, 2007 12:29am

One thing to look at is if you're sending the correct output from the Conditional Split to your destination. Another thing is that you may want to RTRIM to catch trailing spaces instead of just LTRIMming to catch leading spaces.
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2007 2:47am

Thanks for the replay Matthew. I added the RTRIM as you suggested. My output name for my condition is "Bad City Name" and the default output name is "Correct City Name". I connected each output to differentSQL Server tables that are exactly the same except for the table names. The Bad City Name output table is still being populated with data that is actually correct (city = "Wichita Falls" and is in the zipcodes listed above). The Correct City Name output table is being populated with any and all entries except (city = "Wichita Falls" and is in the zipcodes listed above). As a check; I just ran the following query against the source database after replacing the logical operators with their SQL equivalents and the double quotes (") with single quotes (') and the query returned exactly what I am attempting to achieve with Integration Services. select PatientName, PatientCity, PatientState, PatientZip from ampfm.rpt_PatientDemographics where LTRIM(RTRIM(PatientCity)) != 'Wichita Falls' and (PatientZip = '76301' or PatientZip = '76302' or PatientZip = '76305' or PatientZip = '76306' or PatientZip = '76307' or PatientZip = '76308' or PatientZip = '76309' or PatientZip = '76310') I am at a loss as to why the Integration Services routine is not returning the correct row data. I must have something designed incorrectly.This is the first of several similar packages I am creating as the cornerstone to our audit process, but I need the correct data in the output (reporting) tables first. Please advise anything you feel may be in error that I can check. Thanks!
August 24th, 2007 5:08pm

Have you tried putting a data viewer on the path going into and out of the conditional split? It might help to see what data you are getting in, and what data is on which path going out... (perhaps you have your tables flipped on your destinations, etc)
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2007 5:15pm

I am using like LTRIM(RTRIM(valuta_d))="INR" But conditional split is not selecting any record for me Amit kr mishra, IT Consltant
January 24th, 2011 7:00am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics