How can I optimize this dynamic SQL query in oracle with PL/SQL?

How do I write an SQL query where i can retrieve first name only of a name with both first and last name connected in an ORACLE SQL? Example Column named Member John Doe;

  • Oracle SQL

  • Answer:

    SQL: select left(Member, CHARINDEX( ' ', Member) - 1) Oracle: select left(Member, INSTR( ' ', Member) - 1) This is assuming there is a space between the first name and last name for each value.

Joshua Sadlon at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.