Page 1 of 1

Named parameters in queries Postgres

PostPosted: Thu Mar 01, 2018 11:37 am
by andre1506345542
Hi

I use databaseManager.getDataSetByQuery to get a foundset from a query. So I do not use the query builder in this case.
I use Postgres, Servoy 8.2.2, NG Client

I pass parameters in the query as an ?
But I need to use named parameters in my query as I want to use a parameter more then once in my query.

How can I use named parameters?

Thanks
Andre

Re: Named parameters in queries Postgres

PostPosted: Mon Mar 05, 2018 10:59 pm
by sbutler
You don't. You'll just need to repeat the parameter. Parameters are just ordered, so the order of the parameters in the arguments array should match the order of the question marks in the query.

Re: Named parameters in queries Postgres

PostPosted: Tue Mar 06, 2018 12:06 pm
by andre1506345542
Thanks Scott
I thought so, I will repeat them
Andre