Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi !!!
I have some string values, and i can't insert into DB the values starts with 'YY...' and 'YT...'.
For example , i need to insert only 'ABABC01':
row1.Field_A
YYABC01
YYABC02
ABABC01
YTABC01
YTABC02
I have to check the first two characters and if equals YY or YT don't insert this lines
How can i do this in a tMap ?
I 'm using this on filter:
StringHandling.LEFT(row1.Field_A,2)=!'YY' || StringHandling.LEFT(row1.Field_A,2)=!'YT'
but i get an error:
INVALID CHARACTER CONSTANT
tks
Hi
Please see below.
row1.newColumn.substring(0,2)
filter expression:
!(Var.var1.equals("YY")||Var.var1.equals("YT"))
Hi
Please see below.
row1.newColumn.substring(0,2)
filter expression:
!(Var.var1.equals("YY")||Var.var1.equals("YT"))
shong always saves me thanks 🙂
I had to do this modification:
row1.newColumn.substring(0, Math.min(2,row1.newColumn.length()))