Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
xxcarlosxx
Contributor III
Contributor III

Reemplazar valores // Replace values

Hola, tengo un problema para reemplazar algunos valores de la columna "Observaciones", quiero borrar todos los valores que empiecen con "CF", quitar los apostrofes ( ' ) que algunos campos tienen, intente con LEFT para sustituir los apostrofes pero no funciono, espero su ayuda. Gracias.

==== Traductor ====

Hello, I have a problem to replace some values ​​in the "Remarks" column, I want to delete all values ​​that start with "CF", remove the apostrophes ( ') that some fields have, try LEFT to replace the apostrophes but it did not work, I await your help. Thank you.

4 Replies
sergio0592
Specialist III
Specialist III

You can try :

- for delete all values that start with "CF", if(left(Remarks,2)='CF','',Remarks)

- purgechar() function for remove apostrophes.

MarcoWedel

Hi,

one example could be:

QlikCommunity_Thread_241296_Pic1.JPG

tabArchivo:

LOAD Replace(Observaciones,Chr(39),'') as Observaciones

FROM [https://community.qlik.com/servlet/JiveServlet/download/1167490-255585/Archivo.xlsx] (ooxml, embedded labels, table is Sheet1)

Where not Observaciones like 'CF*';

hope this helps

regards

Marco

xxcarlosxx
Contributor III
Contributor III
Author

Hello Jean-Baptiste

Thanks for your answer, it works great, but with the purgechar function, I'm not managing to remove the apostrophes, you could help me. Thank you.


PurgeChar(Observaciones, ' ' ')

rubenmarin

Hi Carlos, for the apostrophe you can use the ascii code:

PurgeChar(Observaciones, chr(39))

Edit: Marco has a full answer to your questions.