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 2008 Forums
 Other SQL Server 2008 Topics
 Automatically change data to uppercase

Author  Topic 

faizul.akmal
Starting Member

3 Posts

Posted - 2010-07-29 : 07:10:33
Dear All,

I've question on how do i automatically stored data in the tables (column) in uppercase word? As example, person name; in the front end(application) we just type "Faizul Akmal" but at the back end (database), the data will be stored in uppercase "FAIZUL AKMAL".

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-07-29 : 07:59:33
Are you sure that you want to do that?
I think it is a bad idea to change good looking data to bad looking data and there is no reliable way back!
You can also use UPPER() in case you need it when displaying or something else.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

faizul.akmal
Starting Member

3 Posts

Posted - 2010-07-30 : 08:54:21
I did used UPPER() to change the lowercase to uppercase. I just want to know if any function or stored procedure to make the work easily. by the way, thanks.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2010-07-30 : 14:27:48
It is worth maintaining the data as it is input _ in relation to case. And then using the application to customise the output.
Would you be able to explain why you want to change the case on the db?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

faizul.akmal
Starting Member

3 Posts

Posted - 2010-08-12 : 23:45:25
User want to standadized all the data captured in the db. If they want to view data in the application, some of the data are in the lowercase and some of it in the uppercase. Not all the data to be captured as uppercase, only a few table as example "customer_ref " table.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-08-13 : 01:41:27
We have Code and Reference columns that are forced upper case too. We change those in a Trigger, but if you were keen to keep the original data, as well, you could use a VIEW that used UPPER() to just present the data in upper case.
Go to Top of Page
   

- Advertisement -