Hello,
PB 2019R3 - PostgreSQL 11
Sample Query to construct a datawindow. Actual query is bit length and does more
SELECT *
FROM crosstab(
$$SELECT *
FROM example
Where field1 = '100'
And field2 = '200'
ORDER BY id ASC, key ASC;$$
) AS ct(blablafirst INT, blablasecond TEXT, blablathird TEXT);
The above query works. NO issues.
When we replace '100' with retrieval argument like this
Where field1 = :as_data1
And field2 = '200' <--------------- Error in this line
And then retrieve the datawindow, we get error
Any solution?
Happiness Always
BKR Sivaprakash
Since PB supports PostgreSQL, I thought this ($$ sub-command) should also work.
$$ sub-command could also be replaced with " (Double-quote). Again that also didn't work.
In this case, how about implementing this DBMS specific SQL feature with a "Stored Procedure"?
Regards ... Chris
As Andreas pointed out, SetSQLSelect works. SetSQLSelect is better than Stored Procedure, IMO, in my use case.
And also, not sure whether SP are fully supported in PB 2019 R3 [ I haven't used PostGreSQL SP's and remember reading about its limitations in this forum ].