Subject | Re: [firebird-support] Re: Possible to write this in a way that indices will be used |
---|---|
Author | Milan Babuskov |
Post date | 2008-05-16T09:33:39Z |
Maya Opperman wrote:
query. I write statements like this:
where ... { and t.Field = :IInputParam }
after params are filled, the function reads the SQL statements looking
for { } and when param inside it is NULL it removes the {...} part
completely.
HTH
--
Milan Babuskov
http://www.flamerobin.org
> If :IInputParam is null thenFor such cases, I have a simple find&replace function that rewrites the
> .. do SQL without mentioning input param
> Else
> .. re-do same sql, but this time add where t.Field = :IInputParam
query. I write statements like this:
where ... { and t.Field = :IInputParam }
after params are filled, the function reads the SQL statements looking
for { } and when param inside it is NULL it removes the {...} part
completely.
HTH
--
Milan Babuskov
http://www.flamerobin.org