To print only the file name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • madan agarwal
    New Member
    • Nov 2008
    • 8

    To print only the file name

    Hi all,

    when we write a query to know backup of database from system table it gives us the full path,i.e

    d:\new\dump\adb a_databasename_ tiemstamp.bkp

    But i want only the filename as output i.e "adba_databasen ame_tiemstamp.b kp"
    is there any string function to it.
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    1. Reverse the string.

    2. Get the position of the first "\".

    3. Do a substring from the first position of the reversed string to the position of the first "\"..

    Happy coding!

    -- CK

    Comment

    • madan agarwal
      New Member
      • Nov 2008
      • 8

      #3
      Thanks for your help......

      Comment

      Working...