sql - Multi level GROUP BY clause not allowed -


i have following crosstab query

transform max(vwdrssta.datum_zeit) maxofdatum_zeit select vwdrssta.antragsnummer ,iif(vwdrssta.system = 'vs', (         select (max(vwdrssta.dunkel)) d         vwdrssta         ), null) dunkel ,max(vwdrssta.vers_nr_int) versicherungsnummer  vwdrssta  inner join v_names on (vwdrssta.system = v_names.system_code) , (vwdrssta.ereignis = v_names.ereignis) group vwdrssta.antragsnummer order vwdrssta.antragsnummer pivot v_names.mapped_name; 

which gives me error "multi-level group clause not allowed in subquery". going wrong code?

try vwdrssta.system in group by clause.

it should trick.


edit detail answer :

transform max(vwdrssta.datum_zeit) maxofdatum_zeit select vwdrssta.antragsnummer     ,iif(vwdrssta.system = 'vs', (             select (max(vwdrssta.dunkel)) d             vwdrssta             ), null) dunkel     ,max(vwdrssta.vers_nr_int) versicherungsnummer vwdrssta inner join v_names on (vwdrssta.system = v_names.system_code)     , (vwdrssta.ereignis = v_names.ereignis) group vwdrssta.antragsnummer, vwdrssta.system order vwdrssta.antragsnummer pivot v_names.mapped_name; 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -