Subject | Re: [IBO] IB_Query and "local" filtering |
---|---|
Author | Svein Erling Tysvær |
Post date | 2015-06-13T22:26Z |
>HiThis is not a direct answer to your question, Marcin, but adding a CTE is maybe a possible workaround (I haven't tried). I.e. rather than
>
>I have a IB_Query that some fields returned are "calculated" by case
>expression and of course these columns have dedicated aliast.
>When I want to filter this query using Filter property like
>"A_CASE_COLUMN = SOME_VALUE' I'm getting exception saying that
>A_CASE_COLUMN is unknown column.
>Is there a way to apply local filtering other than OnFilterRecord event?
SELECT a, case when a < 5 then b else c end as bc
FROM MyTable
you could try
WITH TMP(a, bc) as
(SELECT a, case when a < 5 then b else c end
FROM MyTable)
SELECT * FROM TMP
HTH,
Set