Suth - Wednesday, June 28, 2017 1:47 AM
I'm not sure what you mean. I'm going to reformat your DELETE statement and add table aliases and correct a syntax issue and see if that helps clarify what you're actually seeking to accomplish:DELETE TOP (@DeleteBatchOf) L
OUTPUT DELETED.* INTO dbo.dxi_CDRLogArchive
FROM dbo.dxi_CDRLog AS L
INNER JOIN dbo.u_campaignHdr AS H WITH(NOLOCK)
ON L.qid = H.diallerCampaignId
WHERE H.parentId = @CampaignId;
Let me know if your objective is solely to delete records from the dxi_CDRLog table or is something else.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)