SQL Language (MOSC)

MOSC Banner

how to construct a sql to grab datafile

edited Sep 25, 2013 3:23AM in SQL Language (MOSC) 3 commentsAnswered ✓
 Hi,
I have few datafiles appears to as below:
/u01/datafiles/m1/RFGbook2.dbf
/u01/data/df04/GTbook.dbf
/u01/mount1/gtr01/Bsbook01.dbf

I want to select just the datafile not the folder, for example in this case i want to show only below:
RFGbook2.dbf
GTbook.dbf
Bsbook01.dbf
I don't want all the folders.

I tried selecting from dba_data_files using substring but seems like substring required the number of character in front of the datafile to be same no. of character.
Is there a way for me select anything after the forth forward slash '/' which will derived the datafile?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center