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):
enter image description here

here's inside vb6:
enter image description here

anyone can me solve strange behavior inside vb6?

maybe u need write .

select  sum(filed) aa,...  

and read filed aa record set .


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -