Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Routine with PostgreSQL not working

Hello,

 

I am using a routine which returns date type value.
I have 2 jobs where I have used the same routine.
In first job I'm using Oracle database and in second job database is PostgreSQL.
Both database connections have same data with same datatypes.
When I'm running the job with Oracle connection my routine is doing well
But when I change the connection to postgreSQL it it giving error.
Attaching the screenshots for reference.

 

Thanks,
Trupti

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

PLease remove extra slashes which are not part of postgresql(e.g. routine part)
 "select * from \"DWH\".\"STG\".\"STG_TEST_TABLE\" a
 where \"a\".\"LAST_UPDATED_DATE\" >=
 TO_DATE('\"+Load_max_upaded_date.getValue(\"LOAD_DIMESION\"+\"'yyyy-MM-dd')"
 
needs to be changed with

 "select * from \"DWH\".\"STG\".\"STG_TEST_TABLE\" a
 where \"a\".\"LAST_UPDATED_DATE\" >=
 TO_DATE('"+Load_max_upaded_date.getValue("LOAD_DIMESION"+"'yyyy-MM-dd')"
 
 Thanks,
 Rajashree

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think 

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Hi,

PLease remove extra slashes which are not part of postgresql(e.g. routine part)
 "select * from \"DWH\".\"STG\".\"STG_TEST_TABLE\" a
 where \"a\".\"LAST_UPDATED_DATE\" >=
 TO_DATE('\"+Load_max_upaded_date.getValue(\"LOAD_DIMESION\"+\"'yyyy-MM-dd')"
 
needs to be changed with

 "select * from \"DWH\".\"STG\".\"STG_TEST_TABLE\" a
 where \"a\".\"LAST_UPDATED_DATE\" >=
 TO_DATE('"+Load_max_upaded_date.getValue("LOAD_DIMESION"+"'yyyy-MM-dd')"
 
 Thanks,
 Rajashree

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think