sql - A query with VB6 :but it display wrong sum -
i've write cross query in vb6 :
q = "transform count(ans.proc) conteggiodiproc " q = q & "select ans.codice, count(ans.proc) [totale di proc] ans group ans.codice " q = q & "pivot format([periodo],'mmm') in ('gen','feb','mar','apr','mag','giu','lug','ago','set','ott','nov','dic');" data1.recordsource = q data1.refresh inside ms access it's ok ( total column sum of months),but inside vb6 environment numbers in columns wrong,is equal sum of every month ( i.e. total)!
here's inside access(this correct):

here's inside vb6:

anyone can me solve strange behavior inside vb6?
maybe u need write .
select sum(filed) aa,... and read filed aa record set .
Comments
Post a Comment