Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Development
»
Operand type clash inserting ntext
Operand type clash inserting ntext
Rate Topic
Display Mode
Topic Options
Author
Message
stew_b
stew_b
Posted Wednesday, December 17, 2008 7:45 AM
Grasshopper
Group: General Forum Members
Last Login: Friday, February 08, 2013 7:56 AM
Points: 16,
Visits: 142
Here is what I am trying to do:
update MyTable
set [value] =
(select BulkColumn FROM OPENROWSET(Bulk 'C:\MyFile.txt', SINGLE_BLOB) as blob)
The error:
Msg 206, Level 16, State 2, Line 3
Operand type clash: varbinary(max) is incompatible with ntext
The table:
CREATE TABLE [dbo].[MyTable](
[column1] [varchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[column2] [varchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[value] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[column4] [datetime] NULL,
[column5] [varchar](32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
I get the same error if instead of update I do an Insert into. My confusion is I do not see the datatype "varbinary(max) in play anywhere here.
Post #621233
Jack Corbett
Jack Corbett
Posted Wednesday, December 17, 2008 8:36 AM
SSChampion
Group: General Forum Members
Last Login: 2 days ago @ 12:22 PM
Points: 10,571,
Visits: 11,871
I'm not real familiar with OPENROWSET, but it appears that the OPENROWSET command in SQL Server 2005 is using varbinary(max) as the SQL Server datat type for SINGLE_BLOB in the process.
Jack Corbett
Applications Developer
Don't let the good be the enemy of the best. --
Paul Fleming
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #621290
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.