I am using ORACLE 9i and it doesn't recognize neither the function SUBSTRING (or SUBSTR) nor PARSENAME.
Let's say I want the first and the second letter of a department name. I tried that in the SQL PLUS WORKSHEET:
SELECT SUBSTRING(DEPARTNAME,1,2) FROM DEPARTMENT;
and it says that can't recognize the SUBSTRING FUNCTION. The same applies to PARSENAME and SUBSTR.
The thing is that, when you are using sql plus worksheet, everytime you write something like SELECT, WHERE, ORDER, FROM... the programs changes their colour to blue, whereas SUBSTRING remains black... just like if the program didn't recognize it.
Could you help me please =)
PS: I searched the forum =) but couldn't find a solution to that.
I don't use SQL Worksheet, so Idon't know about the blue font issue, but the function is SUBSTR - SUBSTRING and PARSENAME are not built-in Oracle functions. Forget about the colour, what actually happens if you use SUBSTR in a SQL statement? Do you get an error?
SQL> select substr(dname,1,1) from dept;
SQL> select substring(dname,1,1) from dept;
select substring(dname,1,1) from dept
ERROR at line 1:
ORA-00904: invalid column name