sql server - INSERT INTO Compare tables from 2 databases -
I'm looking at 2 tables to compare 2 tables on the same server and put that data in the third table . I thought it would be easy, but I'm not sure how to do it with 2 databases. The code below is not liked by SQL Server. Any help would be great.
WaterAccounts (CaseNumberKey, MASTER_ACCOUNT, OWNER_NAME, select MAIL_NAME, ACCT_BALANCE) B.CaseNumberKey, C.MASTER_ACCOUNT, C.OWNER_NAME, C.MAIL_NAME, newCityCollection.PropertyInformation putting C.ACCT_BALANCE B, Where DEM C B.Name = C.SERV_STREET and B.DIRECTION = C.SERV_DIRECTION and B.NUM = C.SERV_STREET_NO
If newCityCollection
is another database, and contact information
in that table, you are missing the schema name. Assuming that the dbo
(probably), you can select something to write like shoud:
WaterAccounts (CaseNumberKey, MASTER_ACCOUNT, OWNER_NAME, MAIL_NAME, ACCT_BALANCE) on putting B.CaseNumberKey, C.MASTER_ACCOUNT, C.OWNER_NAME, C.MAIL_NAME, B interiors C.ACCT_BALANCE newCityCollection.dbo.PropertyInformation B.Name = C.SERV_STREET and B.DIRECTION = C.SERV_DIRECTION and B.NUM = Join the CEM CER SERV_STREET_NO
Comments
Post a Comment