I have a question: can I load .docx
files into a column documentbody
with a datatype of ntext
into my table testing.dbo.table00
using a SQL query?
I'm getting an error message
Msg 206, Level 16, State 2, Line 2
Operand type clash: varbinary(max) is incompatible with ntext
Code:
INSERT INTO [Testing].[dbo].[table00](documentbody)
SELECT BulkColumn
FROM OPENROWSET(BULK N'C:\Users\XXX\filename.docx', SINGLE_BLOB) as TheFile
I have also tried the following query:
INSERT INTO [Testing].[dbo].[table00](documentbody)
SELECT BulkColumn
FROM OPENROWSET(BULK N'C:\Users\XXX\filename.docx', CLOB) as TheFile
But I'm getting this error:
Msg 155, Level 15, State 1, Line 4
'CLOB' is not a recognized BULK OPENROWSET provider option.
How can I solve the error? Thanks