I need help with a stored procedure that handle insert/update in a SQL table. SQL table on server A and converted data on server B (linked Server).
I have provided columns from both tables and attached a screen shot.
-- Stored procedure to insert/update a table from a linked server.
------- Table One columns in server A
Insert tablename
ID
FormID,
StateProvinceCode,
StatusCodeID,
EffectiveDate,
ExpirationDate,
ApprovedBy,
ApprovalDateTime
---Table two columns coming from a linked server B
Select
cc
state
efdt
expdt
crby
crdt
mtby
mtdt
exc
cnrownumber
cnxSyncDate --- (optional column)
----- Note
cc column should be inserted/update ----> StatusCodeID
state column should be inserted/update ---> StateProvinceCode
cnrownumber column should be inserted/update ----> ID