- Код: Выделить всё
"SELECT TmpA.ACP,TmpA.GR,TmpO.SUMA " _
& "FROM " _
& "(SELECT UP_ABNT.CP as ACP,UP_ABNT.SHGR as GR FROM UP_ABNT.DBF as UP_ABNT where (right(UP_ABNT.CP,1)='0') ORDER BY 1 ) tmpA " _
& "LEFT JOIN " _
& "(SELECT HO_OBOR.CP+'0' as OCP,SUM(HO_OBOR.SUMM) as SUMA FROM HO_OBOR.DBF as HO_OBOR where ((HO_OBOR.MES=12) AND ((HO_OBOR.VP='П') OR (HO_OBOR.VP='Д'))) group by 1 order by 1 ) tmpO " _
& "ON TmpA.ACP = TmpO.OCP " _
Выдает -error'13' Type mismath. По отдельности каждый подзапрос работает.Что я не учел или не так делаю? Просветите..