August 29, 2006 at 10:56 am
Is there a way to make sure that all the data in the SQL Database automatically be put in uppercase?
August 29, 2006 at 11:50 am
You can do this for each table... don't know about the whole DB tho...
CREATE
TRIGGER dbo.Tr_MyTable_F_IU ON dbo.MyTable
AFTER
INSERT, UPDATE
AS
SET
NOCOUNT ON
UPDATE
MT SET MyCol = UPPER(MyCol) from dbo.MyTable MT inner join Inserted I on MT.KeyCol = I.KeyCol
GO
August 30, 2006 at 7:18 am
Implementing instead of triggers would work. That way you can format the data how you want it.
October 2, 2006 at 10:14 am
Not sure why you'd want that except to make searching easier for programmers. If that is your desire you can install SQL Server for it to NOT be case sensitive.
Thank-you,
David Russell
Any Cloud, Any Database, Oracle since 1982
October 3, 2006 at 5:05 am
Other alternative - not as clean - would to be run a job that uppercases any rows changed since the last run. The triggers mentioned earlier are pretty lightweight, no reason not to use them.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply