I would like to ask you the following, is it possible to use a variable to filter the information that comes from a query of a DBLINK ?. 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
This result I use in a report I publish in JasperSoft, but until now I have not managed to use the parameter $ P {start_date} without generating an error. That's why I thought that maybe I could save that value that they pass to me as a parameter in a variable before I get the data from the internal query, and then use that variable as a filter value.
Is it possible to do something of this style?
Thank you.