dear all,
there is a table called TEST
in that there is a field called UNIT data type is varchar2(30)
SQL> desc TEST
-----------------------
UNIT varchar2(30) (datatype)
the field value is like below
MM-XX-11
MM-YY-11
AA-BB-XXX
AA/BB-XX-000
now my query is i want to retrieve result as below
MM
MM
AA
AA/BB
means return only value which is before first '-'.