Answer the question
In order to leave comments, you need to log in
Update in linked server table between MSSQL and POSTGRESS?
Good time everyone, please tell me in this survey:
There is a table in the database on the MSSQL 2008 server, the POSTGRESS database is connected to it through a linked server, I'm trying to update the data in the table like this:
UPDATE openquery(MOB, 'select amount from account_balance')
SET amount=bal
FROM openquery (MOB, 'select amount, account_barcode from account_balance') rem_k
JOIN (SELECT [general].[dbo].[account].bal, [general].[dbo].[account].barcode FROM [general].[dbo].[account])
[account] ON rem_k.account_barcode=barcode
SELECT rem_k.amount, rem_k.account_barcode, [general].[dbo].[account].bal
FROM openquery (MOB, 'select amount, account_barcode from account_balance') rem_k
LEFT OUTER JOIN
[general].[dbo].[account] ON rem_k.account_barcode=[general].[dbo].[account].barcode
ORDER BY barcode
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question