Quantcast
Channel: Software Applications Programming Errors and solutions.
Viewing all articles
Browse latest Browse all 277

How to get middle name from full name column in SQL Table

$
0
0
The question is How get middle name from full name column in SQL Table? Full name can be like this.
Santosh kumar singh

Raj Narayan verma

Middle name is Kumar and Narayan etc.

Solution.

Use instr to get the position of first space and second space.use substr to get the string from first space +1 to 2nd space - 1. I hope you will get solution.

Example.

 Using substr function it will get the result of middle names.
Substr(colname,instr(colname, ' ', 1,1),instr(colname,' ' , -1,1))

Viewing all articles
Browse latest Browse all 277

Trending Articles