Hi,
Is it possible to reterive the SECOND word from a column contaning a statment, I tried it was working only to fetch the first word, But my requriment is to get the second word. Can anyone help me out in this issue.
EG :
Col_A
Hello man where r u
Wht is it
hello sir
Output:
man
is
sir.
**************************************************************************
The following is the query i tried
SELECT SUBSTR (a, 1, INSTR (TRIM (a), ' '))
FROM (SELECT c2311_question_library_id,
SUBSTR (CONCAT (c2311_question_long_txt, CHR (64)),
INSTR (c2311_question_long_txt, '@') + 1,
LENGTH (CONCAT (c2311_question_long_txt, CHR (64)))
) AS a
FROM t2311_survey_questions
WHERE ROWNUM < 50);
Thanks in advance.