Hi barker
Thanks for the reply. It works fine now.
But i still have one question.
The DataType is ntext for the Column "Notes" in Database. And i declare a
local variable "LocalNotes" as varchar(8000).
As long as tha data in "Notes" (which is ntext) is less than 8000
charahcters, no prob. But when it has more than 8000 characters there is
every chance of loosing data. Do u know how to declare the local variable
also as ntext so that i don't loose tha data.
I tried declaring the "LocalNotes" as ntext, it says not allowed.
Have any idea
Sileesh
"bruce barker" wrote:
in the cursor select
select convert(varchar(8000),LocalNotes) as LocalNotes
of course if you did not use a cursor, you could just copy the data with a
set operation, with a huge performace gain.
-- bruce (sqlwork.com)
"Sileesh" <Si*****@discussions.microsoft.com> wrote in message
news:07**********************************@microsof t.com...
| HI
|
| I know this is not the right forum to post this question, but i think
some
| one might have a suggestion.
|
| I have a Table "Test" with columns
| Id bigint (PK), Number Varchar(50), Notes ntext. in sql server 2000
|
| I ahve a stored procedure in which i am trying to insert the same data as
| new record with column "Number" changed.
|
| So I declared a local variable "Localnotes" as varchar(8000), as ntext is
| not allowed.
|
| Now when i try to get the data from the "TEST"table into a cursor to
locally
| decalred variable "Localnotes", it gives me error
| "Cursor Fetch: Implicit conversion from data type ntext to varchar is not
| allowed."
| .
| Does any one know how to convert "varchar" to "ntext "data type explicitly
| in sqlserver 2000.
|
| Pls help
| Sileesh
|