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)
 Storing ntext data to local variables

Author  Topic 

Ramesha
Starting Member

4 Posts

Posted - 2003-06-25 : 07:47:32
How do i save ntext or text Column data to a local variable. I have a table with row data like this...

id name(text data type)
2 abc
3 def
4 fac

I need to move this 3 records into one column...I saw few examples on using CSV..but those are all using varchar datatype. My column name is an ntext datatype...I needed that column to be ntext datatype.
thanxs in advance...I am using SQL 7.0 not SQL 2000.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-06-25 : 07:51:38
You can't. You can't declare a text or ntext datatype, nor can you manipulate one. The only thing you can do is specify it as a parameter for a stored procedure...and you have to pass a literal value, NOT a variable or column.

Why are you trying to consolidate 3 rows into one column.

Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-06-25 : 08:12:51
ADODB.Stream object may be a very useful thing in cases like your one.

Go to Top of Page

Ramesha
Starting Member

4 Posts

Posted - 2003-06-25 : 08:14:02
Hi,
I had move all these 3 rows into 1 row of 3 column more for an requrirement of DATAWAREHOUSING typeof....
I cant convert the data into varchar as i doubt, it might truncate the data as varchar supports only 8000.



Go to Top of Page

Ramesha
Starting Member

4 Posts

Posted - 2003-06-25 : 08:20:42
Since the amount of data is too high and i plan to implement this on the sql server side and run as a job at a specified time....
As of now, we have solved this using VB and ADO....But, its taking long time to process.... We are looking into a large data volumes....
Anything full done in Sql Server side is highly appreciated...


quote:

ADODB.Stream object may be a very useful thing in cases like your one.





Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-06-25 : 09:11:37
What about UPDATETEXT?

UPDATETEXT {table_name.dest_column_name dest_text_ptr}
{
NULL
| insert_offset
}
{
NULL
| delete_length
}
[WITH LOG]
[
inserted_data
| [{table_name.src_column_name src_text_ptr}
]



Go to Top of Page
   

- Advertisement -