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)
 How to convert a string (ntext) to upper case?

Author  Topic 

KinYeung
Starting Member

14 Posts

Posted - 2006-07-05 : 22:54:46
Hi all,

I've got the problem to change the variable to upper case. when the datatype is ntext, nchar (or n something anyway)

I've check with the help, upper only support varchar.

pls help.
thanks

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-07-06 : 01:57:54
Is this?

declare @n nvarchar(100)
set @n='test'
Select upper(@n) as UpperCase


Madhivanan

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

ravilobo
Master Smack Fu Yak Hacker

1184 Posts

Posted - 2006-07-06 : 02:45:38
>> ntext ??
You can NOT define a variable as ntext.
Also upper() will NOT work with ntext.

Why do you want to convert the whole content of ntext to upper?



------------------------
I think, therefore I am - Rene Descartes
Go to Top of Page

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2006-07-06 : 02:50:40
SQL Server has limited inbuilt functionality for playing around with BLOB data types (of which ntext is one).

Depending on the amount of data, but it might be quicker to knock up a quick application to do the job. ADO has inbuilt support for the BLOB datatypes.

You might also want to try using Access for this. Simply link Access up to your database and run an Access query to do the conversion. It will to the processing locally, so it should get around some of SQL Server's little quirks. That would be my first preference. Probably going to be slow (depending on the amount of data in your tables)

HTH,

Tim
Go to Top of Page

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2006-07-06 : 02:56:36
Yup - I just tried it and it works a treat.....
Go to Top of Page
   

- Advertisement -