March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all,
I am having problems using a parameter in a paginated report with a postgresql database.
I am using an ODBC connection to connect to postgresql.
This is the test query I am using:
with my_data as (
select 0001 as customer_number, 'New York' as city
union select 0002 as customer_number, 'Paris' as city
)
select
*
from
my_data
where
city = (@city)
When I run the script, I get this error message:
An error occurred while executing the query.
ERROR [42883] ERROR: operatot does not exist: @ text;
Error while executing the query
This query works fine for an Orcale DB using this syntax:
where
city = (:city)
But this also fails for Postgres.
Can anyone tell me how the synax for using a parameter in the report builder is if using a Postgres DB?
Thanks in advance
Solved! Go to Solution.
Alright,
I have found a solution to my problem with external help now. With an ODBC connection parameters are created by using the questionmark sign (?). But you are not allowed to use any namens for the parameters anymore.
If you use ? in your SQL, parameters are automatically created in the report builder.
You have to pay attention to the order of the parameters and you are not allowed to rename it afterwards.
Here's an example which works for me:
Alright,
I have found a solution to my problem with external help now. With an ODBC connection parameters are created by using the questionmark sign (?). But you are not allowed to use any namens for the parameters anymore.
If you use ? in your SQL, parameters are automatically created in the report builder.
You have to pay attention to the order of the parameters and you are not allowed to rename it afterwards.
Here's an example which works for me:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
86 | |
84 | |
77 | |
49 |
User | Count |
---|---|
160 | |
144 | |
103 | |
74 | |
57 |