I would like to sync data from offline database to online database. Currently I am performing it using query with some conditions. But data that are edited in offline database after syncing will not be synced again to online in next sync. Is there any easy method to update edited data in online db. My current query is as like below :
INSERT INTO OPENQUERY([103.21.58.192], 'SELECT * FROM [amurajbg_ss].[dbo].[AccLedgers]')
SELECT *
FROM OPENQUERY([USER-PC\SQLEXPRESS],
'DECLARE @LastSyncDate AS DATETIME
DECLARE @CurrentSyncDate AS DATETIME
SELECT @CurrentSyncDate = GETDATE()
SELECT @LastSyncDate = LastSyncDate
FROM [CrushMate].[dbo].[Sync]
SELECT * FROM [CrushMate].[dbo].[AccLedgers]
WHERE CreatedDate BETWEEN @LastSyncDate AND @CurrentSyncDate
AND Status=''True'' ')
My online database server doesn't allow me to perform replication, because I have no permissions to do that. Only way is through query like this.
Thank you