Hi All,
Greetings,
I use AX2012 R3 .Can anyone suggest me how to join two company specific tables to get all their data. I am trying to use cross company but i have a syntax error.here is the code i am trying to use:
Select crosscompany xyztable
join crosscomany abctable
where abctable.pqr == xyztable.def;
Thanks in advance.
I think that crossCompany applies to the whole query, therefore removing it from the join (where it isn’t allowed) should do the job. Please try it and let us know.
By the way, when you need a help with an error, please don’t forget to mention at where you get the error and what the error message says.
I agree with Martin on cross company.
Tip - If both tables are company specific then you may get an error by using table1.dataAredId == table2.dataAredId in the where clause. To over come this you may have to include DataArea table in the join.
Example - \Classes\ReleaseUpdateDB62_SourcingMinor\createVendRFQAmendmentJour
Hi Martin,
Thanks for your response.
I apologize for the lack of clarity. I just get a syntax error at the join cross-company part and there is not much detail about the error.
I have removed crosscompany on joined table and i am able to get all the results.
However if i try to join 3 tables(table 2 and table 3 have a relation with table 1 on which the join is made ) all are company specific, i am not able to get all the results.
Can you comment on it? I can provide more information if you need.
I assume you have some other problem why your code doesn’t return the data you want. Unfortunately I know nothing about neither your code nor your data, so I can’t comment on them. You’ll have to give us more information.