If the newCityCollection
is the other database, and PropertyInformation
the table in it, you're missing the schema name. Assuming it's dbo
(probably is), you shoud write something like this:
INSERT INTO WaterAccounts (CaseNumberKey, MASTER_ACCOUNT, OWNER_NAME, MAIL_NAME, ACCT_BALANCE)
SELECT
B.CaseNumberKey, C.MASTER_ACCOUNT, C.OWNER_NAME,
C.MAIL_NAME, C.ACCT_BALANCE
FROM newCityCollection.dbo.PropertyInformation B
INNER JOIN DEM C
ON B.Name = C.SERV_STREET
AND B.DIRECTION = C.SERV_DIRECTION
AND B.NUM = C.SERV_STREET_NO