Thursday, 15 March 2012

sql server 2012 - SQL sub query not working with group by clause -



sql server 2012 - SQL sub query not working with group by clause -

i using sql server 2012. can tell me going wrong ?

select avg ( tbl.firstbillcomplete ) ( select l.month, a.overallscore, (a.firstbillcomplete), ( a.emailcomplete) tbl_t1 bring together calls.dbo.c1_lp l on a.qid = l.qid union select l.month, a.overallscore, (a.firstbillcomplete), ( a.emailcomplete) tbl_2 bring together calls.dbo.c3_lp l on a.qid = l.qid union select l.month, a.overallscore, (a.firstbillcomplete), ( a.emailcomplete) tbl_3 bring together c2 l on a.qid = l.qid ) tbl grouping tbl.month

the error :

no column specified column 7 of 'tbl'. no column specified column 8 of 'tbl'

you need specify column name column 7 , 8 of tbl: utilize

'' mycolumn7,

for example.

sql sql-server-2012

No comments:

Post a Comment