Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
asmitagg
Partner - Contributor III
Partner - Contributor III

ERROR: QVX PIPE ERROR :Not a legal OleAut date.

Hi All,

I m trying to fetch records using below query:

  1. SQL SELECT ZFBDT FROM BSAK WHERE ZFBDT EQ "00171231”;


but I m facing issue while executing this query  with error message as "Not a legal OleAut date."

Using SAPSqlConnector.

Also attaching image of error and log specifying error.

Please suggest.

Thanks & Regards,

Asmita


18 Replies
asmitagg
Partner - Contributor III
Partner - Contributor III
Author

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.

image003.png

image004.png

tamilarasu
Champion
Champion

The SQL syntax looks correct and it's working fine (even I checked in SAP) as per your last comment. Is it fetching 0 records?

jonathandienst
Partner - Champion III
Partner - Champion III

Perhaps year 0017 is out of range for the automatic date conversion...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
tamilarasu
Champion
Champion

Try this,

SQL SELECT ZFBDT FROM BSAK WHERE ZFBDT < '19000101';

wdchristensen
Specialist
Specialist

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. AncientAliens01.jpg

Why are your trying to load data from before Cleopatra was born? Are you querying artifact data for the new season of Ancient Aliens?

asmitagg
Partner - Contributor III
Partner - Contributor III
Author

Client want this record to be fetched even if it's not so useful .

By the way I have found the solution for this.

Thanks for Ur time.

tamilarasu
Champion
Champion

What is your solution?  I am curious to know..

asmitagg
Partner - Contributor III
Partner - Contributor III
Author

Hi Tamil,

I have tried below steps coz only one date was creating issue:

1. Fetch all the rows except that one record/row values.

LOAD *;

SQL SELECT COLUMN1 COLUMN2 ZFBDT FROM BSAK WHERE ZFBDT != "00171231”;


2.

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.

tamilarasu
Champion
Champion

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 .