sql - Syntax error (missing operator) in query expression 'Mainv1 Grouped.GroupMonth=V.GroupMonth -


i trying add column in query table. have added table reference recieving error message stating have syntx error (missing operator)in select expression

select mainv1grouped.groupmonth, mainv1grouped.totalbk, v.errorcount, doc.docreviewerrors, v.errorcount/mainv1grouped.totalbk errorpercent (select sum(mainv1.number) totalbk, datepart("yyyy",[mainv1].[proddate],1,1) & "-" & right('0'& datepart("m",[mainv1].[proddate],1,1),2) groupmonth

from mainv1 (mainv1.department) in('afs booking')

and ((mainv1.function) in('agr - mre','agr - not mre','assump/partic','auto booked - b/c nre','auto booked - b/c re','bcu - mre','bcu - not mre','bodp','comm - mre','comm - not mre','comm fee','guidance line','guidance line / lease line','l/c secured','l/c unsecured','manual booked - b/c re','manual booked - b/c nre','mods','mods - cap lines/cap mgr/beql','mods book & rev','rebooks-othr','retail','unsec - all'))

and datediff('m', [mainv1].[proddate], date())<13 group datepart("yyyy",[mainv1].[proddate],1,1) & "-" & right('0'& datepart("m",[mainv1].[proddate],1,1),2)) mainv1grouped left join (select count(datav.id) errorcount, datepart("yyyy",[datav].[prod date],1,1) & "-" & right('0'& datepart("m",[datav].[prod date],1,1),2) groupmonth

from datav group datepart("yyyy",[datav].[prod date],1,1) & "-" & right('0'& datepart("m",[datav].[prod date],1,1),2)) v on mainv1 grouped.groupmonth = v.groupmonth

and

left join (select count(docreviewerrors.id) reviewerrorcount, datepart("yyyy",[docreviewerrors].[bookeddate],1,1) & "-" & right('0'& datepart("m",[docreviewerrors].[bookeddate],1,1),2) groupmonth

from docreviewerrors group datepart("yyyy",[docreviewerrors].[bookeddate],1,1) & "-" & right('0'& datepart("m",[docreviewerrors].[booked date],1,1),2)) doc on mainv1grouped.groupmonth = doc.groupmonth;


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -