Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I would like to place on question.
I want to make a query on a oracle database with qlikview, but I have an error.
An example of what I am trying to do is this:
SELECT todate(sysdate,'DD-MM-YYYY') as "data" from dual; |
This returns the error on the image attached.
*Error translation: the literal does not correspond to the character chain if the format SELECT...
If I run the line SELECT todate(sysdate) as "data" from dual; it works without a problem.
EDIT: I forgot to say that if I run the statement on sql developer it works...
Any ideas?
Thanks in advance!
Hi Ivo
Use To_Char instead of ToDate
SELECT to_char(sysdate,'MM/DD/YYYY') as "data" from dual;
Regards
Aviral Nag
The default date format might be SET DateFormat='MM/DD/YYYY';
Try to change and re run the script
With this line
SELECT todate(sysdate,'MM/DD/YYYY') as "data" from dual;
I get a new error: Not a valid month, probably because today is the 21st and on where is MM should be the value of the day...
But the formatting of the date should overwrite this...
I forgot to say on the top post that if I run the statement on sql developer it works...
Hi Ivo
Use To_Char instead of ToDate
SELECT to_char(sysdate,'MM/DD/YYYY') as "data" from dual;
Regards
Aviral Nag
HI,
After making connecting string with Oracle database.
try below
SQL SELECT todate(sysdate,'DD-MM-YYYY') as "data" from dual;
Regards
ASHFAQ
It works with to_char.
Thanks!!