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
 Transact-SQL (2000)
 how to conver entire data of tables to uppercase

Author  Topic 

DURGESH
Posting Yak Master

105 Posts

Posted - 2009-03-12 : 04:57:04
hi all,
can anybody help me to convert the entire data of table in upper case

regards
Durgesh J

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-03-12 : 04:59:40
Do it column by column!

update <tablename> set <column1>=upper(<column1>)
Go to Top of Page

DURGESH
Posting Yak Master

105 Posts

Posted - 2009-03-12 : 05:08:34
Hi Senthil,
Sorry not by using update statement.
Can we set any constraint that should convert the data to upper case at the time of insertion.

As I heard in D2k of oracle there is concept called property sheet by using this one can set the data in upper case. Is there any feature available in sql server 2000

regards
Durgesh J
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-03-12 : 05:10:54
You can make use of the result and use in update

select column_name+'=upper('+column_name+'),' from information_schema.columns
where table_name='table_name'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

heavymind
Posting Yak Master

115 Posts

Posted - 2009-03-12 : 05:19:19
quote:
Originally posted by DURGESH

Hi Senthil,
Sorry not by using update statement.
Can we set any constraint that should convert the data to upper case at the time of insertion.

As I heard in D2k of oracle there is concept called property sheet by using this one can set the data in upper case. Is there any feature available in sql server 2000

regards
Durgesh J



I would think of a trigger to implement this...

Thanks, Vadym
MCITP DBA 2005/2008
Chief DBA at http://www.db-staff.com
Go to Top of Page

DURGESH
Posting Yak Master

105 Posts

Posted - 2009-03-12 : 05:22:15
Sorry
it is not my requirement

i want to set some constraint at table level of at column level,
such that when user enters data in lower case, it should get inserted in upper case

regards
Durgesh J
Go to Top of Page

DURGESH
Posting Yak Master

105 Posts

Posted - 2009-03-12 : 05:24:49
If triggers were used, i will be performance issue

regards
Durgesh J
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-12 : 14:08:19
quote:
Originally posted by DURGESH

Sorry
it is not my requirement

i want to set some constraint at table level of at column level,
such that when user enters data in lower case, it should get inserted in upper case

regards
Durgesh J


ideally, you shouldnt be concerned about case in which data is stored in table unless you use case sensitive collation. you can always use formatting functions available in front end to display data in whatever way you want (lower,upper,bold,..)
Go to Top of Page
   

- Advertisement -