February 22, 2010 at 10:58 am
OK - first off I don't want to have to script the process of finding the rows with carriage returns in a column. I want to split them out into a separate data stream.
I can't seem to find a way to use the transformations to find an ASCII character in a string. I could do a replace with a literal that the conditional split would like if that were the case.
I'd prefer not to use a staging table if possible. Finding those rows using T-SQL is trivial if I do but it's not exactly optimal if I can keep everything in one data flow.
Suggestions?
February 22, 2010 at 2:58 pm
What is your data source?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 22, 2010 at 3:07 pm
Seems to be a unicode text file.
February 23, 2010 at 1:16 am
Finding a character in a string - use FINDSTRING.
Finding a carriage return - look for "\r".
Finding a new line - ""
Edit, that new line code should say
double quote backslash n double quote
but the post renderer seems to strip it out.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
March 5, 2010 at 1:12 pm
Thanks. Looking for \r did the trick.
And not mixing up what goes where in the FINDSTRING didn't hurt either. ~facepalm~
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply