Func To Get File Name And Date

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Func To Get File Name And Date as PDF for free.

More details

  • Words: 93
  • Pages: 2
create or replace function func_togetfilenameanddate(file_name varchar2,type varchar2) return varchar2 is -/*---------------------------------------------------------------------------------------------------------*/ --/*--created by : venkatesan s --------------------------------------------------------------------*/ --/*--datelastmodified : 04-mar-2008 ---------------------------------------------------------------------*/ --/*--purpose : to split the server name and date from file_name --------------------------------*/ --/*--version : 1.0 -----------------------------------------------------------------------------*/ --/*--sample : select func_togetfilenameanddate('svm:01:01:2007','date') from dual; ------------*/ -/*---------------------------------------------------------------------------------------------------------*/ v_file_name varchar2(200 char); --/*--to collect the required details--*/ begin -/*---------------------------------------------------------------------------------------------------------*/ --/*--to extract the server name -----------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------------------------------------*/ if type = 'filename' then v_file_name := substr(file_name,1,instr(file_name,':',1,1)-1); return v_file_name; -/*---------------------------------------------------------------------------------------------------------*/ --/*--to extract the date -----------------------------------------------------------------------------------*/ -/*---------------------------------------------------------------------------------------------------------*/

elsif type = 'date' then v_file_name := to_date(substr(file_name,instr(file_name,':',1,1)+1),'dd:mm:yyyy'); return v_file_name; end if; end; /

Related Documents

Func Toconvert Date Time
November 2019 20
Name: Date: / /
June 2020 21
Name Date
June 2020 19
Name Date
June 2020 43
Name Date
June 2020 21