|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Sunday, April 08, 2012 9:24 PM
Points: 2,
Visits: 20
|
|
I want to used the below query to transfer the data from old db to new db. But it's failed.
-- The below doesn't work. (content is blank) use newdb
DECLARE @val BINARY(16) SELECT @val=TEXTPTR([Content]) FROM [olddb].dbo.[ta_news] WHERE 1=1 AND [Id] IN (100000000795) ORDER BY [Id]
WRITETEXT [ta_news].[Content] @val (SELECT [Content] FROM [olddb].dbo.[ta_news] WHERE [Id] IN (100000000795))
-- The below can let me to write the data successfully. But it's not my purpose.  WRITETEXT [ta_news].[Content] @val N'new content'
So does anybody can give suggestion on this? So that I can transfer the data from old db to new db.
Thanks,
Benny Ng
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 4:27 PM
Points: 2,007,
Visits: 6,040
|
|
Have you tried
INSERT INTO [newdb].dbo.[ta_news] SELECT [ID], [Content] FROM [olddb].dbo.[ta_news] WHERE [Id] = 100000000795
Shamless self promotion - read my blog http://sirsql.net
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Sunday, April 08, 2012 9:24 PM
Points: 2,
Visits: 20
|
|
Nicholas Cain (12/27/2008)
Have you tried INSERT INTO [newdb].dbo.[ta_news] SELECT [ID], [Content] FROM [olddb].dbo.[ta_news] WHERE [Id] = 100000000795
But this is not supported the nText data type.
The content after 4000 chars will be cut.
|
|
|
|