Questions tagged [ntext]

ntext is a data type in SQL Server. Questions should be specifically about the ntext data type, such as it's behaviour or (lack of) functionality, such as when compared to nvarchar(MAX) that superceded it in SQL Server 2005.

ntext allows for storage of values longer than 4,000 characters/8,000 bytes in a string based data type in SQL Server.

The data type was deprecated in SQL Server 2005 and should not be used in new development work, and ideally work to replace any existing use of it should be completed. Microsoft have stated the data type will be removed in a future version of SQL Server, however, as of SQL Server 2022 the data type has not yet been removed.

ntext (as well as text and image) cannot be used in a lot of functionality that the newer data types can be used in.

56 questions
0
votes
0 answers

Inserting to SQL Server NTEXT Field

I want to insert a row into a SQL Server table via Laravel Query Builder. I'm converting unicode characters with the method below: mb_convert_encoding($value, 'UCS-2LE', mb_detect_encoding($value, mb_detect_order(), true)) Everything works fine…
Cihan Küsmez
  • 1,967
  • 5
  • 22
  • 41
0
votes
0 answers

Parse NTEXT SQL Column into multiple columns for every word

Hello I have a ntext column that contains a check image. In this check image there are a hundred or so words and values. What I am attempting to do is convert each word or value into a separate column. Check_Image…
0
votes
1 answer

Server 2012 R2 SQL Database Change Column From ntext to nvarchar

I have a predefined SQL data base that we have to work correctly with a reporting software we have purchased. When ever we pull a column of data with the reporting software we get system.indexoutofrangeexception error. On the first table we replaced…
CAL
  • 1
0
votes
1 answer

Different field serialization technique in ntext SQL field while keeping backward compatibility

TL, DR: we've been serializing some data in some tables of our SQL DB. Unfortunately that serialization technique wastes a lot of space for markup characters. We've found a new, more efficient way: to keep backwards compatibility, is it safe to…
Carlo Arnaboldi
  • 363
  • 2
  • 15
0
votes
1 answer

SQLServer - Exclude NTEXT columns while comparing data using EXCEPT/INTERSECT

In my SQL, I would need to compare data between two tables in SQLServer 2008R2 to return the rows where mismatch is present (using EXCEPT) and likewise matching rows in other cases (INTERSECT). The problem is, some of the columns have NTEXT datatype…
kallakafar
  • 725
  • 3
  • 11
  • 27
0
votes
2 answers

SQL Server : read full ntext column value

I have aspnet_Tablename. kindly see below pic for data design. Now, here on PropertyValuesString column, data is storing as a xml format. When I run this query. SELECT TOP 10 [PropertyValuesString] FROM Table I am getting results, but not the…
Kvadiyatar
  • 929
  • 14
  • 29
0
votes
1 answer

Restore saved data as text while it should be ntext

I've a database on SQL Server 2008 R2. In a table there's a column that should be with type ntext but it was designed as a text column. So the data was sent, saved as text then it was saved as question marks (unrecognized). I've changed the type to…
0
votes
1 answer

Convert ntext to clob

I have to copy data from one table to another which one table is in Oracle and one is in MSSQL Server. I want to copy the data from MSSQL Server table to Oracle table. The problem is that the MSSQL Server table has one column which is of data type…
charilaos13
  • 543
  • 2
  • 7
  • 19
0
votes
1 answer

Read xml string from a sql server database with Perl

I have a table in which there is a column called XML of type ntext in that I am storing XML string. When I read that column with Perl script and print it then whole XML string is not printing. Instead of printing whole XML it only prints < T u m o r…
thatisvivek
  • 875
  • 1
  • 12
  • 30
0
votes
1 answer

OLEDB comparison problem nvarchar against ntext (SQLServer 2005)

I have table Tbl1( SomeName nvarchar(64) ) Over OLEDB I'm trying to select SELECT 1 FROM Tbl1 WHERE SomeName = ? binding 3 character unicode as parameter causes: DB_E_ERRORSINCOMMAND(0x80040E14L) "The data types nvarchar and ntext are incompatible…
Dewfy
  • 23,277
  • 13
  • 73
  • 121
-1
votes
1 answer

Stored procedure cut value of ntext parameter

I have a strange issue: i created a simple stored procedure in Microsoft SQL Server: @id INT, @ntextParameter NTEXT, ... UPDATE xxx SET [Field] = @ntextParameter WHERE ID = @id but when i execute it with a long text, it update the table and simply…
Matteo Zambon
  • 99
  • 1
  • 11
1 2 3
4