CREATE PROCEDURE [dbo].[procDeleteComputer]
	@ComputerId varchar(128)
AS
	DELETE FROM tblObjectRelationship WHERE guid = @ComputerId or subguid = @ComputerId
	DELETE FROM tblDocument WHERE ComputerMac = @ComputerId
	DELETE FROM tblApplication WHERE ComputerId = @ComputerId
	DELETE FROM tblSite WHERE ComputerId = @ComputerId
	DELETE FROM tblAppStat WHERE ComputerId = @ComputerId
	DELETE FROM tblNetStat WHERE ComputerId = @ComputerId
	DELETE FROM tblEvent WHERE ComputerId = @ComputerId
	DELETE FROM tblSysInfo WHERE ComputerId = @ComputerId
	DELETE FROM tblAlert WHERE ComputerId = @ComputerId
GO
