Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I have a very basic query. I am not able to sort it out. the question seems to very silly though.
I am extracting data from ORACLE through SQL Command.. The data is very huge and I don't want to upload the whole data and I would like to do increment loading.
For that purpose I have written script as :
LET LastReloadTime = ReloadTime();
SQL SELECT * FROM HILCBS."XXHILCBS_MON_DETAILS_INST_ALL"
WHERE LAST_UPDATE_DATE >$(LastReloadTime);
and the format of LAST_UPDATE_DATE is like for example 21.08.2015 18:00:00.
When executing the script, it is returning error as SQL Command not properly ended.
I know that the LastReloadTime should return as '21.08.2015 18:00:00'.
I mean to say between hyphen as shown above.
My RelaodTime is giving me desired format as I have modified the TimeStampFormat accordingly.
How to do that. Any help will be highly appreciated.
Thanks,
Manish Prasad
What is the format of "LAST_UPDATE_DATE"?
You can also format ReloadTime() with Date() funtion.
Hi Manish,
could you try this?
SQL SELECT * FROM HILCBS."XXHILCBS_MON_DETAILS_INST_ALL"
WHERE LAST_UPDATE_DATE > '$(LastReloadTime)';
HTH
Regards
Hi,
Hi can you try by removing double quotes on the table name.
- KK -
This should work
LET LastReloadTime = TimeStamp(ReloadTime(),'YYYY-MM-DD hh:mm:ss');
SQL SELECT * FROM HILCBS. XXHILCBS_MON_DETAILS_INST_ALL
WHERE LAST_UPDATE_DATE > '$(LastReloadTime)';
try
if ReloadTime() returns the defualt timestamp format..
LET LastReloadTime = timestamp(ReloadTime(),'DD.MM.YYYY hh:mm:ss');
else if it returns a string in the odbc format
LET LastReloadTime = timestamp(timestamp#(ReloadTime(),'YYYY-MM-DD hh:mm:ss'),'DD.MM.YYYY hh:mm:ss');
SQL SELECT * FROM HILCBS."XXHILCBS_MON_DETAILS_INST_ALL"
WHERE LAST_UPDATE_DATE >'$(LastReloadTime)';
hth
Sasi