Join two tables (Customer Master - RM00101 & RM00102)

I would like to join   RM00101 (RM Customer MSTR) and RM00102 (Customer Master Address File) into one to get the output in a single report. I tried using query as under :

SELECT CUSTNMBR from RM00101 join RM00102 on CUSTNMBR.RM00101 = CUSTNMBR.RM00102 where INACTIVE '0'. 

But the above-said didn't fetch any data rather threw the error.

Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "CUSTNMBR.RM00101" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "CUSTNMBR.RM00102" could not be bound.
Msg 209, Level 16, State 1, Line 1
Ambiguous column name 'CUSTNMBR'.

Purpose for the query is that I am trying to pull whole Customer Master Data which Active having single as well as more than one addresses.

Apperciate any help on this in advance!.

Thanks,

Chemp

Related
Recommended