I have a SQL database that populates tables on my local machine. I then upload this data to a SQL database that is being hosted with Microsoft Azure. Typically when I am done uploading the data to Azure, I delete it locally. I do this for backups and to give my clients access to it.
I have one local table that I am having a hard time deleting data from. I have 4 columns that also constitute the key. I have a screenshot below. These four columns will always produce a unique row, however any one of these columns by themselves will not.
Below is an example of data that I want to delete locally. These are database records that are locally stored and in Azure. Since they are in Azure, I want to delete them locally.
select c.[statusId], c.[classifierName], c.[className], c.[classValue]
FROM [dbo].[classifications] c
Inner join [AzureSQL].[MyDb].[dbo].[classifications] ac on
c.statusId = ac.statusId
and c.classifierName = ac.classifierName
and c.className = ac.className
and c.classValue = ac.classVale
How can I update this query to delete my local records?
My local table is [dbo].[classifications]
While my Azure table is [AzureSQL].[MyDb].[dbo].[c
Also, Azure is setup as a linked server. Any help would be greatly appreciated.