when I use Invantive Data Hub to dowload data from multiple Exact Online companies , I get duplicate rows when I expect one row per company.
I use the following query:
select gla.code
,      gla.description
,      gla.division
,      glc.glclassification_code_attr
,      glc.glclassification_description
,      glc.division_code
from   ExactOnlineREST..GLAccounts gla
join   ExactOnlineXML..GLAccountClassifications glc
on     gla.code     = glc.GLCLASSIFICATIONLINKS_GLACCOUNT_CODE_ATTR
and    gla.division = glc.division_code
where  gla.code     = '4001'
and    gla.division = 12345
The result I expect back is 1 row but the query retrieves 12 rows.
A single query from the separate tables does give the expected result of 1 row. e.g.:
select glc.glclassification_code_attr
,      glc.glclassification_description
,      glc.GLCLASSIFICATIONLINKS_GLACCOUNT_CODE_ATTR
,      glc.division_code
from   ExactOnlineXML.XML.GLAccountClassifications glc
where  glc.GLCLASSIFICATIONLINKS_GLACCOUNT_CODE_ATTR = '4001'
and    glc.division_code                             = 12345
and:
select gla.Code
,      gla.Description
,      gla.Division
from   ExactOnlineREST..GLAccounts gla
where  gla.code     = '4001'
and    gla.division = 12345
How do I ensure that the combined query returns just 1 row as expected for division 12345?