Code: Select all
OracleCmd= "echo ": pExecSql :"; | sqlplus -S ": pOraUser :"/": pOraPass :"@": pOraDsn
Call DSExecute("NT", OracleCmd, Output, SystemReturnCode)
Call DSLogInfo("Sql Result: " : Output, "SQL")
Line=Field(Output,@FM,4)
Ans=Line
for example:
if i run this statement:
Code: Select all
SELECT max(to_date("'"01-01-1900 00:00:00"'", "'"DD-MM-RRRR HH24:MI:SS"'")) FROM <table_name> t WHERE ROWNUM = 1
or
SELECT to_char(MAX(MAX_UPDATE_RECORD_TIME), "'"DD-MM-RRRR_HH24:MI:SS"'") from BATCH_RUN_TABLE WHERE ETL_BATCH_NAME = "'BATCH_NAME'" and ETL_BATCH_RUN_STATUS = "'Completed'"
if i run:
Code: Select all
SELECT MAX(t.update_date_time) FROM sr_mrkdb.STUDENT_CLASSES_HISTORY t WHERE t.update_date_time >= to_date("'"01-jan-1900"'")
or
SELECT MAX(t.update_date_time) FROM sr_mrkdb.STUDENT_CLASSES_HISTORY t WHERE t.update_date_time >= to_date(: "'" : '01-01-1900 00:00:00' : "'" : ', ' : "'" : 'DD-MM-RRRR_HH24:MI:SS' : "'" : )
or
SELECT MAX(t.update_date_time) FROM sr_mrkdb.STUDENT_CLASSES_HISTORY t WHERE t.update_date_time >= to_date("'"01-01-1900 00:00:00"'" , "'"DD-MM-RRRR_HH24:MI:SS"'")
i read couple threads:
viewtopic.php?p=283199
viewtopic.php?p=280909
viewtopic.php?p=354481
none of them really solve the problem, does anyone know to to deal with it? or is there anyway to get around this?
thanks
Howard