Page 1 of 1

plsql

Posted: Thu Aug 07, 2008 9:17 am
by nithya
hi,

this is an example data

91-044-5677-8899
123-777-008-222
554-99-098-9999

can anyone tell me how to get this type of data
91-044
123-777
554-99

Posted: Fri Aug 15, 2008 6:17 am
by wenjie
SELECT SUBSTR(FIELD_NAME,1,6) FROM TABLE;

Posted: Fri Aug 22, 2008 4:19 am
by MasterN
SELECT SUBSTR(Column_Name,1,INSTRB(Column_Name,'-',1,2)-1) FROM table

I think it solve ur problem.

Pray for me.
Farooq