Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SqlState: 22007, ErrorCode: 0, ErrorMsg: [Oracle][ODBC]Invalid datetime format.

Hey guys,

I am loading data from Oracle and I get the following error:

QVX_UNEXPECTED_END_OF_DATA: SQL##f - SqlState: 22007, ErrorCode: 0, ErrorMsg: [Oracle][ODBC]Invalid datetime format.


From what I read in the internet the problem is with the time format in the database.

Since I cannot touch the database itself, how can I load my data, only by fixing my script?


1 Solution

Accepted Solutions
nizamsha
Specialist II
Specialist II

Hi,

IF You normally load the data from database u wont get any issue but comparing it will create a issue ,when i was facing the problem i used to do two things

1) i will change the date format in Qlikview as like your Database format

or

2) from Database itself i will change the date in what format i want

View solution in original post

13 Replies
simospa
Partner - Specialist
Partner - Specialist

Try to post a snippet of code so we can help you easily 🙂

S.

nizamsha
Specialist II
Specialist II

Hi

i Hope you are writing increment load comparing Qik view date with Database date if its mean this error will throw is that correct

Not applicable
Author

Idk if this will help you, it is just a basic load...It works for 10 other tables i am loading, only this and another one are failing !

LOAD

     ID,
     Type,
     Date("DATA_BEG") as "DATA_BEG",
     Date("DATA_END") as "DATA_END",
     Vaue,
     ID2,
     ID3,

     ID4,
     STATUS
;

SQL SELECT *

FROM TableX;

nizamsha
Specialist II
Specialist II

Hi,

IF You normally load the data from database u wont get any issue but comparing it will create a issue ,when i was facing the problem i used to do two things

1) i will change the date format in Qlikview as like your Database format

or

2) from Database itself i will change the date in what format i want

Not applicable
Author

I am sorry, but I do not understand. What exactly do you mean ?

Thank you for your help

nizamsha
Specialist II
Specialist II

Hi,

Why you r Passing double quotation in Date Field

Try this

LOAD

     ID,
     Type,
     Date(DATA_BEG,'DD-MM-YYYY') as DATA_BEG,
     Date(DATA_END,'DD-MM-YYYY') as DATA_END,
     Vaue,
     ID2,
     ID3,

     ID4,
     STATUS
;

SQL SELECT *

FROM TableX;

Not applicable
Author

Ok, so if I got you right:

1) means to change the "SET TimeFormat= ...", "SET DateFormat=...." and "SET TimestampFormat=..."

to the ones that are in the Oracle db? ...I will try that and see what happens.

2) I cannot touch anything in the DB

Furthermore, I tried to comment the 2 date fields, but the error is the same ...

Not applicable
Author

I tried all kinds of variations of what you imply above, but nothing worked ...same error !

Clever_Anjos
Employee
Employee

Do you have access to an Oracle Client?

Would you mind posting the result of

SELECT *

FROM TableX;

?