1

I have a column in my oracle db as character and data stored in this is like here

30.170527093355002,72.615875338654 and
30.805165,71.82474

Now I want to get the separated by comma whole string. I mean I want to get the part of string before comma and also part after comma separately. Please any one tell me is there any built in function to do this that I can separate my while string by comma regardless of comma position where it exist.I have already tried floor function and substr but all in vain please help me to use any built in function or user defined function to full fill my requirements.

1 Answer 1

4
    select
      substr( COLNAME, 1, instr( COLNAME, ',') - 1 ) as p_1 ,
      substr( COLNAME, instr( COLNAME, ',', - 1 ) + 1 ) as p_2
    from YOURTABLE
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.