Subject | Re: [firebird-support] Problem with where clause |
---|---|
Author | Mark Rotteveel |
Post date | 2018-01-05T16:11:53Z |
On 5-1-2018 14:35, m_brahim11@... [firebird-support] wrote:
... should work just fine.
In your case, execute statement only adds overhead and removes compile
time syntax checking and makes it easier to make mistakes and harder to
spot them.
Changing this to use for select would simplify your code, as you would
not be dealing with string concatenation, and you get a compile time
syntax check in return.
Mark
--
Mark Rotteveel
>It works, but you should not be using execute statemen. Using for select
>
> Now with
>
> V1=:V1 || ' WHERE CF.DATE_COMMANDE'||' BETWEEN '''||:FROM_DATE||''' AND
> '''||:TO_DATE||'''';
>
> It works for me and I tried with
>
> V1=:V1 || ' WHERE CF.DATE_COMMANDE>='''||:FROM_DATE||''' AND
> CF.DATE_COMMANDE<='''||:TO_DATE||'''';
>
> It works too. In which case this isn't the right solution ?
... should work just fine.
In your case, execute statement only adds overhead and removes compile
time syntax checking and makes it easier to make mistakes and harder to
spot them.
Changing this to use for select would simplify your code, as you would
not be dealing with string concatenation, and you get a compile time
syntax check in return.
Mark
--
Mark Rotteveel