Parameter in Dblink Connection

Hi there

Hi wonder if it is possible to create a dblink connection using parameter in Jasper. Something like this:
 

SELECT *
 
FROM ( SELECT * FROM dblink('dbname=db port=5432 host=dbhost user=dbuser password=dbpassword',
 
'SELECT column_1, column_2, date_in FROM table t WHERE t.date_in >= $P{start_date}') AS check_table(column_1 INTEGER, column_2 text, date_in DATE) ) AS b ORDER BY checkout_number 

Using de $P{start_date} parameter as an internal filter to improve the performance of my query.

I have made some test and looked for some approaches, but so far anything haven't t worked. Anyone has any idea about how to reach this, or this is definitly not allowed? Regards

db2907's picture
20
Joined: Jul 7 2016 - 6:53am
Last seen: 3 years 4 months ago

0 Answers:

No answers yet
Feedback
randomness