Buy Questpond's video subscriptions on
huge discount
.
Online: 1163
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
>
Sql Server
>
Loading ...
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: 2058 |
Points: 40
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Select from following answers:
23817644494783476
D2A3D81CF76E44A49D4783FBE4DDB76B
DADCFEADFBEDDBB
None of the above
All Above
The above query strip out only the alphabets from the text
Show Correct Answer
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
What will the below command do? EXEC xp_cmdshel ...
Next > :
What will be the output of declare @str varchar ...
Comments or Responses
Login to post response
More Interview Questions by Rajnilari2015
What will be the output of declare @str varchar(max) set @str = ...
What will be the output of with cte as ( select 1 as rn,'DNF ...
What will be the output of PRINT 'DNF ' GO 5
What will be the output of SELECT REPLICATE ('DNF ', 5)
What will be the output of declare @t table(name varchar(50),subje ...
What will be the output of declare @tbl table(id int identity, ref ...
What will be the output of declare @str as varchar(100) declare @ ...
What will be the output of DECLARE @str AS VARCHAR(500) ,@xml ...
Latest Interview Questions
What will be output of below code? public class MyClass { ...
All processes have at least one thread of executions, which is called?
The CLR will not shutdown an application until all --------- threads h ...
How many types of threads are defined by .NET Framework?
When you create a thread, it is by default which type of thread?
You have recently developed a Class named “ShopList”. The class is hav ...
What is the difference between Dispose() and Finalize() methods?
You have database table named purchaseHistory that contains million of ...
More ...