Link to home
Start Free TrialLog in
Avatar of meperera
meperera

asked on

SQL SERVER 2000 matching the case

Hi Experts,
  I have a SQL table(CustNames) that has the following fields.
FirstName
LastName
Address
PrefersName
etc..,

I want to make the PrefersName field the same as the Firstname.I have tried the follwing SQL command.
UPDATE  CUSTNAMES SET PREFERSNAME=FIRSTNAME ;

However my problem is that it changes everything from mixed case ti uper case.
eg.., John becomes JOHN

How do I get around this ?

Cheers,
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

How odd; that really shouldn't happen.

Please script out the table definition (script "CREATE" table) and post it.  
you sure you dont have any trigger?
it doesn't change case when i tried it.

ziolko.
Avatar of meperera
meperera

ASKER

Thanks ScottPletcher:.
  Unfortunately I haven't got access to the create table script as that was wrttem by someone else. I am the maintainence person. Is there a way to copy the binary values and convert them instead of copying the string ?

Thanks again,
zoilko was going the same route as my mind was going.  It sounds like you have a trigger that is set on the table that is doing an UPPER(value) to the data you are trying to insert there.
I just realized you may not have permissions to look for the trigger.  If you don't have access to look at the triggers trying doing this:

UPDATE  CUSTNAMES SET PREFERSNAME=LOWER(FIRSTNAME)

If you run that and then check the data again and it's still capitalized I'd be about 99% sure that's what's going on.

I can change the PREFERSNAME to UPPER or LOWER without a problem. The only thing I can't  get is mixed case
ASKER CERTIFIED SOLUTION
Avatar of Swindle
Swindle
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial