reading csv - MySQL files (Point - Comma Problem)

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

reading csv - MySQL files (Point - Comma Problem)

drfg2008
SPSS 20

we try to read csv-files from (MySQL-) sources who use comma instead of semicolon and points as decimal. Is there a command in SPSS which I could set at the beginning of the syntax to let the program know that decimals are points not comma and separators of variables are comma instead of semicolon (if possible only temporary since most of the files come with comma instead of point as decimal).

Thanks,
Frank
Dr. Frank Gaeth

Reply | Threaded
Open this post in threaded view
|

Re: reading csv - MySQL files (Point - Comma Problem)

drfg2008
... I tried it with:

SET DIGITGROUPING=No Small=0.0001 Unicode=No OLang=English.

but this doesn't work.

The files come from a MySQL DB, were read by SPSS 20 and saved by SPSS 20 as csv.
Dr. Frank Gaeth

Reply | Threaded
Open this post in threaded view
|

Re: reading csv - MySQL files (Point - Comma Problem)

David Marso
Administrator
In reply to this post by drfg2008
It likely has to do with your locale settings.  IIRC you probably have yours set as German?
Mr NoH probably knows precisely. My caveman version doesn't have these settings.
*BUT* is there a SET LOCALE, SHOW LOCALE?  check your current syntax reference???

drfg2008 wrote
SPSS 20

we try to read csv-files from (MySQL-) sources who use comma instead of semicolon and points as decimal. Is there a command in SPSS which I could set at the beginning of the syntax to let the program know that decimals are points not comma and separators of variables are comma instead of semicolon (if possible only temporary since most of the files come with comma instead of point as decimal).

Thanks,
Frank
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: reading csv - MySQL files (Point - Comma Problem)

Jon K Peck
In reply to this post by drfg2008
The default decimal character for F format comes from your locale setting.  That has nothing to do with the olang setting.  You can set your locale to a dot-decimal locale  via SET LOCAL=english, say, or use COMMA format instead of F.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        drfg2008 <[hidden email]>
To:        [hidden email]
Date:        02/13/2012 02:29 AM
Subject:        Re: [SPSSX-L] reading csv - MySQL files (Point - Comma Problem)
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




... I tried it with:

SET DIGITGROUPING=No Small=0.0001 Unicode=No OLang=English.

but this doesn't work.

The files come from a MySQL DB, were read by SPSS 20 and saved by SPSS 20 as
csv.

-----
Dr. Frank Gaeth
FU-Berlin

--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/reading-csv-MySQL-files-Point-Comma-Problem-tp5478556p5478577.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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: reading csv - MySQL files (Point - Comma Problem)

drfg2008
SET LOCALE = english.

that works. Thanks.
Dr. Frank Gaeth

Reply | Threaded
Open this post in threaded view
|

Re: reading csv - MySQL files (Point - Comma Problem)

drfg2008
In reply to this post by Jon K Peck
that works. Thanks.
Dr. Frank Gaeth