Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 change any lowercase to uppercase

Author  Topic 

QuietRiot
Yak Posting Veteran

67 Posts

Posted - 2008-02-13 : 10:58:21

I have a table called FundInfo and the column is called FundName
I want to change any values that are in lowercase to uppercase

Thanks for your help

sqldev6
Starting Member

18 Posts

Posted - 2008-02-13 : 11:01:32
Is there any primary key on the table?
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-02-13 : 11:02:20
you can use upper()

Em
Go to Top of Page

sqldev6
Starting Member

18 Posts

Posted - 2008-02-13 : 11:04:03
just use run the following statment

UPDATE TABLE_NAME SET COL1=UPPER(COL1)

Go to Top of Page

QuietRiot
Yak Posting Veteran

67 Posts

Posted - 2008-02-13 : 11:09:51
quote:
Originally posted by sqldev6

just use run the following statment

UPDATE TABLE_NAME SET COL1=UPPER(COL1)





will this change the table settings or anything. I just want the values updated but not to mess with anythign else.

Go to Top of Page

sqldev6
Starting Member

18 Posts

Posted - 2008-02-13 : 11:17:57
yes this will only converted data into UPPER case .

UPDATE fundinfo set fundname=upper(fundname)
Go to Top of Page

QuietRiot
Yak Posting Veteran

67 Posts

Posted - 2008-02-13 : 11:38:10
Thanks guys!!
Go to Top of Page

QuietRiot
Yak Posting Veteran

67 Posts

Posted - 2008-02-21 : 12:36:41
new request..

how can i query any rows that are NOT all uppercase?

like
select FundId, FundName
From FundInfo
Where FundName <> upper(FundName)

but that doesn't do it
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-02-21 : 13:11:30
SELECT FundID, FundName
FROM FundInfo
WHERE CAST(FundName AS VARBINARY(8000)) <> CAST(UPPER(FundName) AS VARBINARY(8000))



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

QuietRiot
Yak Posting Veteran

67 Posts

Posted - 2008-02-21 : 13:17:20
thank you peso

worked like a charm
Go to Top of Page
   

- Advertisement -