3
Is there any way to bring in the result of SELECT
the parameter values used in the clause WHERE
?
Example:
SELECT
a.*, cast(:dataIni as date) AS inidate , cast(:dataFin as date) AS inidate
FROM
mytable a
WHERE
a.date BETWEEN :dataIni AND :dataFin
Is there any way to return the values of the parameters as query fields using Firebird?
It is not very clear what you are asking. Please explain better.
– user7261
You want to cast before submitting the date for validation?
– gmsantos
I believe that what AP wants, is to bring the values of the parameters as query fields
– Caputo
You’re probably trying to solve some mystery. Tell us the goal of wanting to bring the value of the parameters in the query result and we can help.
– Caffé
There’d be no way to do it using Prepared Statements? I don’t know much about Irebird to know if it has such functionality.
– gabrielhof
@gabrielhof Yes, Firebird has Prepared statements. But I don’t understand how this relates to bringing the value of the parameters in the Select result.
– Caffé
It could pass this as parameters in the execution of the statement. But anyway, it would be necessary to pass the same parameter twice (one to the
select
and another to thewhere
). As you replied, it makes no sense to do this, but I was wondering if it was possible to do.– gabrielhof
It would be an XY Problem?
– ptkato
What is the test environment?
– EMBarbosa