Quick question, on running the ff query, I can do
select a.column, sum(decode(a.column,'string',1,'etc...')
But when I include it in a func/procedure, it won't allow me too and would give a PL/SQL: SQL Statement ignored error and it will only compile if I remove the first a.column like so
select sum(decode(a.column,'string',1,'etc...')
Why is this so? And how should it be re-written to include the select a.column, ?