I m trying to fetch records using below query:
but I m facing issue while executing this query with error message as "Not a legal OleAut date."
Also attaching image of error and log specifying error.
Thanks & Regards,
SQL SELECT ZFBDT FROM BSAK WHERE ZFBDT = '20171231';
This will fetch the records for date 20171231 but i want records for date 00171231.
Below are the snapshots from SAP system.
Perhaps year 0017 is out of range for the automatic date conversion...
Another option is that your date is actually stored as a DateTime. Please try:
SQL SELECT ZFBDT FROM BSAK WHERE ZFBDT >= '00171231' AND ZFBDT <= '00180101';
That way you can see if the time effecting your query.
Why are your trying to load data from before Cleopatra was born? Are you querying artifact data for the new season of Ancient Aliens?
I have tried below steps coz only one date was creating issue:
1. Fetch all the rows except that one record/row values.
SQL SELECT COLUMN1 COLUMN2 ZFBDT FROM BSAK WHERE ZFBDT != "00171231”;
Then fetch the same table again except " ZFBDT" date field and hard-code the date value in script like below
Ex: LOAD *,'00171231' as ZFBDT;
SQL SELECT COLUMN1 COLUMN2 FROM BSAK WHERE ZFBDT = "00171231”;
- Then concatenate both the tables.
This is temporary solution to get the whole record for this date.
The main reason for such cases is SAP connector version.
SAP connector 6.1 to 6.3 doesn't support these date.
For this to resolve we have to upgrade connector to 6.3.1 or next.
Great and glad that you found a solution for your problem. I have to check which version of SAP connector we are using in our server. Is the below statement not fetching the date 00171231 ?
Select Column1, Column2, ZFBDT From BSAK;
Thanks for the information. You can mark your own reply as correct. Happy Sunday, Asmita .