Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter transformation - filter condition

Status
Not open for further replies.

sa0309

Programmer
Apr 5, 2010
45
US
My source is a csv file that has a field ( FIRST_NAME ) that contains an ~ in it on some records. I want to filter those out. Below is the filter condition I'm attempting to use.

substr(FIRST_NAME,1,1) = REG_EXTRACT(FIRST_NAME,'^[a-zA-Z]')

I only want to pass records that start with an alphabetic char, a-zA-Z, It appears to be filtering out all my rows because nothing is making it to my tgt.

Any suggestions on the filter condition would be appreciated.



Thanks in advance.
 
I have never used the SUBSTR function with a FILTER Transformation, so I am not sure if that works.

Try creating a one character field in an expression transformation, then passing it to the filter transformation.

If that doesn't work, see if a filter condition: CHK_FLD NE '~' works.

Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top