Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Unwanted extra character '?' is appending with text string

$
0
0

Hi,

I am trying to insert an NTEXT value from one table T1 to another table T2 within a database.Table structures are as below;

Create table T1 (T1ID INT NOT NUll, SourceColumn Ntext null)

Create table T2 (T2ID INT NOT NUll, TargetColumn NVARCHAR(MAX) null)

Every time when long text value is getting inserted into T2.TargetColumn , it is appending with an unwanted character '?' either at the beginning or at the ending of the text string. Same problem happens even when I am trying to update T2.TargetColumn = T1.TextColumn. Because of this, the same column never matches to the source column and gets updated everytime even there is no change...

I am also converting NTEXT column to NVARCHAR(MAX) and replacing CHAR(10) to '' .

I am using SQL Server 2012. How can I avoid inserting '?' in T2.TargetColumn . Is there any setting which I need to set in the target table?

Thanks,

Hmai


Viewing all articles
Browse latest Browse all 23857

Trending Articles