Monday, December 31, 2012

Convert Unix file Creation date into Oracle date


The below code snippet is used to convert the file creation date into oracle date format in unix shell script.
we can get the file creation date of mytextfile.txt and assign into ctime variable. give the ctime variable in oracle insertion script/where clause.
ctime=`stat -c%y mytextfile.txt| sed 's/\..*$//'`

to_date('${lv_ctime}','YYYY-MM-DD HH24:MI:SS')

No comments:

Post a Comment

Table Lock - Query in Oracle APPS

 SELECT client_identifier,        module,        action,        s.*   FROM v$session s  WHERE sid IN (SELECT session_id                  FRO...