Sql server XQuery sql:variable and bit data type

Klqpmauk

New Member
The following query returns \[code\]<s>false</s>\[/code\]. However I expect it returns \[code\]<s>0</s>\[/code\]. Is it a way to do it?\[code\]declare @b bit = 0declare @xml xml = '<x></x>';select @xml.query('<s>{sql:variable("@b")}</s>')\[/code\]
 
Back
Top