Hello,
I try to create a query with a “group by” statement and a “join”.
This is the query:
select sum(TaxBaseAmountCur)
from _A
index hint AnnoCodiceAnagTT_Idx
group by Anno, CodiceAnag, TipoDato, NC,
AccountNum, InvoiceId, InvoiceDate, CountryRegionId,
TaxCode
where _A.Test != NoYes::Yes &&
_A.Anno == iAnno &&
_A.CountryRegionId != ‘IT’ &&
_A.AccountNum == ‘22225375’ &&
_A.TipoDato == WebUserType::Vendor
join _B
index hint TaxCodeIdx
where _B.TaxCode == _A.TaxCode;
The problem is that I can’t see the value of _B.TaxCode or other fields of table _B.
If I delete the “group by” statement I haven’t any problems.
Could someone help me to understand why?
Thanks a lot!