PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD] - Select fields
[WD] - Select fields
Iniciado por guest, 05,sep. 2017 17:41 - 3 respuestas
Publicado el 05,septiembre 2017 - 17:41
Hi All

I want to SELECT DISTINCT MyField FROM ... but I want to treat all MyField the same if they have the same value regardless if they have trailing spaces i.e. "SMITH" is the same as "SMITH ".

I tried using NoSpace() but that does not return any results at all then.

Any suggestions?

Thanks
Publicado el 05,septiembre 2017 - 18:02
Hi JP,

SELECT DISTINCT LTRIM(YourField) FROM...

Cheers,

Peter Holemans
Publicado el 05,septiembre 2017 - 18:14
To remove the spaces in both ends use TRIM
In the left LTRIM
In the right RTRIM
Publicado el 05,septiembre 2017 - 19:23
Peter & Paulo

Thanks very much. Will use those functions instead of NOSPACE()