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,
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,
you sure you dont have any trigger?
it doesn't change case when i tried it.
ziolko.
it doesn't change case when i tried it.
ziolko.
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,
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(FIRSTNAM E)
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.
UPDATE CUSTNAMES SET PREFERSNAME=LOWER(FIRSTNAM
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.
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please script out the table definition (script "CREATE" table) and post it.