Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Change a table column from nvarchar to varbinary(max)

Hello,
I am writing a query to change the datatype of the sql table column from navarchar to varbinary(max).
The query i am referring is to :

ALTER TABLE dbo.Fie
   ALTER COLUMN DrIgLoc varbinary(max)

But, I get this error :
Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query.


Any suggestions  without recresting the table as this is live.


Cheers
SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Cheers! Worked like charm!