Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Campo sin caracter en ultima posición

Buenos días:

Tengo el siguiente problema. En un campo de texto con los valores siguientes:

MV9C

MFCAC

MCV9C

NC

NNCNC

TRCTTC

.......

Necesito generar un nuevo campo con todos los registros pero sin el ultimo carácter "C".

Gracias de antemano

1 Solution

Accepted Solutions
hector_munoz
Specialist
Specialist

Hola,

Prueba: Left(CAMPO, Len(CAMPO) - 1) AS CAMPO

, y si solo quieres que lo haga si el último carácter es C, entonces: If(Right(CAMPO; 1) = 'C', Left(CAMPO, Len(CAMPO) - 1), CAMPO) AS CAMPO

Saludos,

H

View solution in original post

2 Replies
hector_munoz
Specialist
Specialist

Hola,

Prueba: Left(CAMPO, Len(CAMPO) - 1) AS CAMPO

, y si solo quieres que lo haga si el último carácter es C, entonces: If(Right(CAMPO; 1) = 'C', Left(CAMPO, Len(CAMPO) - 1), CAMPO) AS CAMPO

Saludos,

H

Not applicable
Author

Perfecto.

Muchas Gracias