|
max(case when datediff(YY,max(birth_date1),getdate()) > 18 then dep_first_name1 else 0 end) maj_dep_first_name When I run my procedure with the above statement I get teh error: Cannot perform an aggregate function on an expression containing an aggregate or a subquery. Any help is appreciated. Thanks RTSFO
(comments are locked)
|
|
you have a max() within another max() try removing the outer max()
if does not work, please post your full query
(comments are locked)
|

