How to use Parsename in-built function to split delimited data?

 Posted by Vishalneeraj-24503 on 3/1/2015 | Category: Sql Server Interview questions | Views: 369 | Points: 40
Answer:

Use below query:-
select parsename(replace(isnull('vishal kumar',''),' ','.'),1);

Output:
kumar

select parsename(replace(isnull('vishal kumar',''),' ','.'),2);

Output:
vishal


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response