Date: Thu, 8 Mar 2012 05:35:10 -0500
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: David Wright <firstname.lastname@example.org>
Subject: Re: change case on variable labels
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=no
Thanks Bruce & John. After I saw your post I saw that the solution was
staring me in the face. I have the original syntax for this spss file
so it was easy as you suggested to simply pull in the variable names in
Word & make the case change. It's not necessary for our spss users and
is a small pain to make the change but for our non-spss users &
reporting services which use our oracle databases we have to upload our
spss files to the database which we do via syntax (using the syntax from
the export database wizard) and this normally goes smoothly. But for
our larger files we need to do bulk inserts (otherwise it would take
hours for the load). In both the MS sql server & oracle server
environments, this requires us to export the spss file as a csv which is
then uploaded via a format file on the sql side for bulk inserting. On
the MS sql server side, mixed case variable names are not a problem but
on the oracle side the batch utility our dba uses requires upper case.
Thanks again for your help as always...
On Wed, Mar 7, 2012 at 4:22 PM, Bruce Weaver wrote:
> David, do you mean that you have something like this
> variable labels
> v1 "First_name"
> v2 "Last_name"
> v3 "Age"
> v4 "Sex"
> ...and you want it to look like this?
> VARIABLE LABELS
> V1 "FIRST_NAME"
> V2 "LAST_NAME"
> V3 "AGE"
> V4 "SEX"
> If so, you could simply copy the relevant syntax into Word, and use
> Format-Change Case to change to uppercase, then paste back into your
> Alternatively, you could read the entire syntax file into SPSS (via
> DATA), use UPCASE to change everything to uppercase, then write it
> back out
> to a syntax file with WRITE OUTFILE. E.g.,
> GET DATA
> /1 V1 0-59 A60.
> * Depending on the length of your lines of syntax, you may
> * need to alter the number of columns & formatting for V1 above.
> COMPUTE V1 = UpCase(v1).
> WRITE OUTFILE = "C:\Temp\MySyntaxUpCase.sps" / v1 .
> The Pythonistas will probably find this terribly old-school, but it
> David Wright-6 wrote
>> I have a sp file that has mixed case variable labels (e.g.,
>> I need to change the case on all variable labels to upper case (e.g.,
>> LAST_NAME). We are performing some oracle based bulk inserts & the
>> program we're using wants the column names to be upper case. Didn't
>> know if this was possible via straight syntax, no python please.
>> in advance.
>> To manage your subscription to SPSSX-L, send a message to
>> LISTSERV@.UGA (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
> Bruce Weaver
> "When all else fails, RTFM."
> NOTE: My Hotmail account is not monitored regularly.
> To send me an e-mail, please use the address shown above.
> View this message in context:
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
> To manage your subscription to SPSSX-L, send a message to
> LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except
> 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
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
For a list of commands to manage subscriptions, send the command