Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kaldubai
Creator
Creator

SQL Query not working with OLE DB

Hello Community,

i have been trying this simple sql query while using OLE DB but it was throwing errors  but when i changed the connection to ODBC

it worked just fine

here is the query that i have been working on :

Sql SELECT *

FROM APPSRO.MTL_SYSTEM_ITEMS_B

WHERE TO_DATE(LAST_UPDATE_DATE,'DD-MON-RR') >= '$(Last_updated_Date)';

does anyone know why its working with odbc but not oledb ?

do i have to apply modification in order to get it working with oledb ?

Sincerely

7 Replies
techvarun
Specialist II
Specialist II

I don't think you need to change the code.

have you checked your OLEDB Driver? are you  able to connect to the database server using OLEDB?

kaldubai
Creator
Creator
Author

@varun

i am able to connect to the database and fetch the data but with out Where clause.

Sincerely

vinieme12
Champion III
Champion III

can you post screenshots of the error mesg?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
kaldubai
Creator
Creator
Author

The below screen shot while using oledb:

i have tried to change the format of the date passed to the variable in multiple ways but it was of no use.

OLEDB.PNG

the below screen shot while using odbc

ODBC.PNG

vinieme12
Champion III
Champion III

remove the single quotes

$(Last_updated_Date)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

https://www.techonthenet.com/oracle/errors/ora01861.php

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.