var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: select in filter like result of another select
In simple way I want to do something like this:
where EMPLOYEE like (select distinct 'VAC'||right(year,2)'%' from shd.dim_date where year=year('08/31/2016'))
select inside filter must show for example 'VAC16%'. Right now the result is VAC16%.
How write this to get 'VAC16%'
I did something like this:
''''||(select distinct 'VAC'||right(year,2)||'%' from shd.dim_date where year=year('08/31/2016'))||'''
the result in select is 'VAC16%' but it doesn't work in filter
thanks for any answers
Last edited by Grekio; 08-25-16 at 06:53.
try something like this:
with pattern (str) as (values 'VAC16%', 'VAC17%')
'VAC16***', 'VAC17***', 'VAC18***'
) e (employee)
where exists (
from pattern p
where e.employee like p.str
Originally Posted by mark.bb
I must use this formula becouse is prepared from another system.
right now I found a bug
(select distinct 'VAC'||right(year,2)||'%' from shd.dim_date where year=year('08/31/2016'))
without any '
I lost || before '%'
One thing it is never a good idea to use wildcard charters in your data. '%' is a definite problem.
Tags for this Thread