I have the following query that returns the record that I want to delete from a database table.SELECT a.* FROM LOM_INFLO.bpSQL_INFLO.dbo.Advertisers a where NOT EXISTS(SELECT AdvertiserID FROM Advertisers a2 where a.AdvertiserID=a2.AdvertiserID)
I tried converting this to a delete statment but it fails on meDELETE FROM LOM_INFLO.bpSQL_INFLO.dbo.Advertisers a where NOT EXISTS(SELECT AdvertiserID FROM Advertisers a2 where a.AdvertiserID=a2.AdvertiserID)
Can anybody point out what I am doing wrong.basically Im trying to delete records from one table on a linked server that doesnt exist in the primary table.I also triedDELETE LOM_INFLO.bpSQL_INFLO.dbo.Advertisers where NOT EXISTS(SELECT AdvertiserID FROM Advertisers a2 where LOM_INFLO.bpSQL_INFLO.dbo.Advertisers.AdvertiserID=a2.AdvertiserID)
but I get the following error:The number name 'LOM_INFLO.bpSQL_INFLO.dbo.Advertisers' contains more than the maximum number of prefixes. The maximum is 3.
Edited by - yakoo on 11/06/2001 14:32:33Edited by - yakoo on 11/06/2001 14:33:42