all groups > sql server mseq > april 2006 >
You're in the

sql server mseq

group:

change all the letters to small cap


change all the letters to small cap Tiffany
4/12/2006 12:02:01 AM
sql server mseq:
Hi,

Can anyone tell me how to change the names in a column to small cap.

e.g.
Name
Jane
Michael
Ronald
Eliza

to
Name
jane
michael
ronald
eliza

Your help will be greatly appreciated.

Thank you

Tiffany

Re: change all the letters to small cap Hugo Kornelis
4/12/2006 10:17:43 PM
[quoted text, click to view]

Hi Tiffany,

To change the display only:

SELECT LOWER(Name)
FROM YourTable

To permanently change the names to lowercase in your table:

UPDATE YourTable
SET Name = LOWER(Name)

--
Re: change all the letters to small cap Tiffany
4/12/2006 10:52:01 PM
Thanks!

May i ask you another question. I would like to remove the name in the model
column.

e.g from CybershotDSC123 to DSC123.

Thanks in advance.

[quoted text, click to view]
Re: change all the letters to small cap Hugo Kornelis
4/16/2006 1:02:55 AM
[quoted text, click to view]

Hi Tiffany,

Depends on

a) Do you want to hide it from display but keep the data intact, or do
you want to remove it from the real data?

b) How can the computer "know" what part of the model is the company
name? Is it always "Cybershot"? Is it stored in another column in the
same table? Is the part of the model that should be left allways the
last six characters? Any other way?

--
Re: change all the letters to small cap Tiffany
4/16/2006 10:15:01 PM
it is always cybershot and i want to remove it from the real data.

[quoted text, click to view]
Re: change all the letters to small cap Hugo Kornelis
4/17/2006 10:52:17 PM
[quoted text, click to view]

Hi Tiffany,

Run the code below

BEGIN TRANSACTION
UPDATE YourTable
SET YourColumn = REPLACE(YourColumn, 'Cybershot', '')

Check results. If anything is wrong, execute ROLLBACK TRANSACTION. If
all is okay, execute COMMIT TRANSACTION.

--
AddThis Social Bookmark Button