Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
FGuijarro
Contributor III
Contributor III

Copying and replacing some column values from table A to table B

Hello,

I´m trying to create a expression from the tMap Expression Builder with this logic:

I have a mysql INPUT table called "sucursal" with 2 columns:

  • "id"
  • "razonsocial"

Column "razonsocial" has these values:

aaa

bbb

ccc

bbb

I am trying to create a new column called "empresa" in the OUTPUT table called "sucursal" (see pic attached) which will copy same content of column "razonsocial" (aaa, bbb, ccc, bbb, qqq) BUT if value is bbb then it will write zzz.

So the final content for output table will be:

aaa

zzz

ccc

zzz

I've tried to write a expression but I´m not sure to use replaceall, replace or ereplace. Any help, please?

Thank you!

Labels (3)
1 Reply
jlolling
Creator III
Creator III

"bbb".equals(row3.razonsocial) ? "zzz" : row3.razonsocial