What will be the output of

declare @str varchar(max)
set @str = 'D2A3D81C-F76E-44A4-9D47-83FBE4DDB76B'
;with cte as(
select 1 as rn
union all
select rn+1 from cte where rn<LEN(@str)),
cte2 as(
select rn,chars
from cte
cross apply(select SUBSTRING(@str,rn,1) chars)X
where chars like '%[A-Za-z]%'
select * from (
select cast(chars as varchar(max))from cte2
for xml path(''))X(numericData)

 Posted by Rajnilari2015 on 1/24/2016 | Category: Sql Server Interview questions | Views: 1903 | Points: 40
Select from following answers:
  1. 23817644494783476
  2. D2A3D81CF76E44A49D4783FBE4DDB76B
  4. None of the above
  5. All Above

Show Correct Answer

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response