Is there a setting one can make so that the case of a character of a
string variable is ignored when executing logic statements? For example, if var1='This is' and var2='this is' I would like the case to be ignored if I have a statement like SELECT IF VAR1 EQ VAR2. I would like to still retain the case of the characters of a variable when I write it out to a text file. I have checked the SET statements and the Options that is a choice under Edit. I am running ver 21. Stan ===================== 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 |
There is no such setting,but you can use the lower function: SELECT IF lower(VAR1) EQ lower(VAR2) (or upper if you prefer) On Tue, Sep 15, 2020 at 4:52 PM Stan Gorodenski <[hidden email]> wrote: Is there a setting one can make so that the case of a character of a |
Thanks much Jon. That is just what I need.
Stan On 9/15/2020 4:03 PM, Jon Peck wrote: > There is no such setting,but you can use the lower function: > SELECT IF lower(VAR1) EQ lower(VAR2) > > (or upper if you prefer) > > On Tue, Sep 15, 2020 at 4:52 PM Stan Gorodenski <[hidden email] > <mailto:[hidden email]>> wrote: > > Is there a setting one can make so that the case of a character of a > string variable is ignored when executing logic statements? For > example, > if var1='This is' and var2='this is' I would like the case to be > ignored > if I have a statement like SELECT IF VAR1 EQ VAR2. I would like to > still > retain the case of the characters of a variable when I write it > out to a > text file. I have checked the SET statements and the Options that > is a > choice under Edit. I am running ver 21. > Stan > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] <mailto:[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 > > > > -- > Jon K Peck > [hidden email] <mailto:[hidden email]> > ===================== 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 |
Free forum by Nabble | Edit this page |