question about ltrim

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

question about ltrim

Rodrigo Briceño
Dear SPSS users. I have a database with names of medical procedures. The
original database was translated from a different language by another
person. This process was made in ACCESS software. The thing is that I'm
working with the Database in SPSS and I discovered that some of the
names of procedures have a blank space at the beginning. I tried to quit
this blank space using LTRIM, but nothing happened. I think that maybe
this function didn't work since not all the descriptions have this blank:

What do you recommend to me (an invented example follows):

descr
 proc1
proc2
 proc3
proc4

--

__________________________________________________________________

*Rodrigo Briceño*
Project Manager
Sanigest Internacional

+506  22-91-12-00 ext. 113  * Oficina* *Costa Rica*
+506  22-32-08-30                  *Fax
*+506  88-86-11-77*                  Celular**
*[hidden email] <mailto:[hidden email]>
www.sanigest.com <http://www.sanigest.com/>

MSN: [hidden email] <mailto:[hidden email]>
SKYPE: rbriceno1087

_____________________

This communication contains legal information which is privileged and
confidential. It is for the exclusive use of the address and
distribution, dissemination, copying or use by others is strictly
prohibited. If you have received this communication by error, please
delete the original message and e-mail us.


Esta comunicación contiene información legal privilegiada y confidencial
para el uso exclusivo del destinatario. La distribución, diseminación,
copia u otro uso por terceras personas es estrictamente prohibida. Si
usted ha recibido esta comunicación por error, le rogamos borrar el
mensaje original y comunicárnoslo a esta misma dirección.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: question about ltrim

Oliver, Richard
LTRIM works just fine on your example:

data list free /stringvar (a6).
begin data
descr
 proc1
proc2
 proc3
proc4
end data.
compute stringvar=ltrim(stringvar).
list.

Remember that transformations don't take effect until you run a command that reads the data (in this case LIST reads the data and executes the pending transformation).

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Rodrigo Briceño
Sent: Wednesday, April 16, 2008 9:48 AM
To: [hidden email]
Subject: question about ltrim

Dear SPSS users. I have a database with names of medical procedures. The
original database was translated from a different language by another
person. This process was made in ACCESS software. The thing is that I'm
working with the Database in SPSS and I discovered that some of the
names of procedures have a blank space at the beginning. I tried to quit
this blank space using LTRIM, but nothing happened. I think that maybe
this function didn't work since not all the descriptions have this blank:

What do you recommend to me (an invented example follows):

descr
 proc1
proc2
 proc3
proc4

--

__________________________________________________________________

*Rodrigo Briceño*
Project Manager
Sanigest Internacional

+506  22-91-12-00 ext. 113  * Oficina* *Costa Rica*
+506  22-32-08-30                  *Fax
*+506  88-86-11-77*                  Celular**
*[hidden email] <mailto:[hidden email]>
www.sanigest.com <http://www.sanigest.com/>

MSN: [hidden email] <mailto:[hidden email]>
SKYPE: rbriceno1087

_____________________

This communication contains legal information which is privileged and
confidential. It is for the exclusive use of the address and
distribution, dissemination, copying or use by others is strictly
prohibited. If you have received this communication by error, please
delete the original message and e-mail us.


Esta comunicación contiene información legal privilegiada y confidencial
para el uso exclusivo del destinatario. La distribución, diseminación,
copia u otro uso por terceras personas es estrictamente prohibida. Si
usted ha recibido esta comunicación por error, le rogamos borrar el
mensaje original y comunicárnoslo a esta misma dirección.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD