Bit confused by this and I cannot get any consistancy. Say I have a select statement that has a big case statement which I call 'x'. Sometimes I am able to say 'Group By x' and other times it says this is an unknown column and I have to copy and paste the case statement after the group by which works (but is a pain - duplication).
Does anyone know why?
Does anyone know why?
