Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7164361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:03:46+00:00 2026-05-28T14:03:46+00:00

When I run the sql query I got something like this : Disallowed implicit

  • 0

When I run the sql query I got something like this :

Disallowed implicit conversion from data type varchar to data type
varbinary…. Use the CONVERT function to run this query. (severity
16)`

The data I want to insert looks like

'00001200000000000010000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF...FFF'

How to done this query?

Query looks like :

UPDATE <table> SET VARBINARY_DATA = '00001200000000000010000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF....' WHERE ID = 12
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:03:46+00:00Added an answer on May 28, 2026 at 2:03 pm

    From SQL Server 2005 onwards CONVERT does what you want:

    CONVERT(varbinary(2000), '00001340132401324...', 2)
    

    The styles for converting to/from binary are:

    • 0: Raw data, ascii codepoints become binary bytes, UTF-16 codepoints become two bytes each.
    • 1: Hex format, prefixed with ‘0x’
    • 2: Hex format, not prefixed with ‘0x’

    For converting characters to binary in format 0:

    • char or varchar data (e.g. ASCII, ISO-8859-1) become binary bytes. For single character encodings this means one byte per character.
    • nchar or nvarchar data (i.e. UTF-16) become two bytes each, in big-endian format, so N'ABC' becomes 0x410042004300

    For converting hex to binary in formats 1 and 2:

    • Each two input hex digits become one byte
    • If input is not valid hex an error occurs
    • Whitespace and punctuation are not allowed

    See MSDN:

    • https://learn.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql

    If you need UTF-8, please see my answer here for a UDF that will convert text to UTF-8:

    • Compute MD5 hash of a UTF8 string
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’ve got a basic SQL query that looks like: SELECT TOP 1 [geom].STBuffer(500) FROM
If I run the following SQL query SELECT * FROM A LEFT JOIN B
This SQL query was generated by Microsoft Access 2003, and works fine when run,
I did batch to run SQL query like use [AxDWH_Central_Reporting] GO EXEC sp_spaceused @updateusage
I have a sql query like this String loadFav = SELECT _id, title, name,
I've got a query that works fine when I run it in SQL Developer,
I run this query: SELECT u.user_id, u.fname, u.lname, n.title, n.news_id, n.post, n.zip, z.city,z.state_abbr FROM
Original SQL query is this; SELECT id,post_title,post_date FROM wp_posts where id='1' When I retrieve
I have code to run sql query in ruby as follows sql = ActiveRecord::Base.connection()
I want to run a sql query on a specific schedule (weekly) and need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.