Home Dashboard Directory Help
Search

Behavior changes of value() in SQL Server 2012 by carlop


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 776560
Opened: 1/14/2013 11:00:08 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

The following query returns different results in SQL2008 and SQL2012:
declare @hexstring varchar(max) = NULL
select cast('' as xml).value('xs:hexBinary( substring(sql:variable("@hexstring"), 0) )', 'varbinary(max)')

in SQL2008 returns NULL
in SQL2012 returns 0x

In the changelog documentation there's no word about this
Details
Sign in to post a comment.
Sign in to post a workaround.