In this forum you can share stuff related to Oracle 11g, 10g, 9i.
-
nithya
- Posts: 6
- Joined: Tue Dec 04, 2007 5:15 am
- Location: India
Post
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
-
wenjie
- Posts: 30
- Joined: Mon Jul 07, 2008 5:42 am
- Location: Indonesia
Post
by wenjie »
SELECT SUBSTR(FIELD_NAME,1,6) FROM TABLE;
-
MasterN
- Posts: 12
- Joined: Mon Jun 23, 2008 3:32 am
- Location: Pakistan
Post
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
Users browsing this forum: No registered users and 1 guest