DELETE FROM ibeammac_iScan.sys_properties 
where parenttype = 'login'  
and parentid in (Select customerid  from customers where emailaddress = 'JA@gmail.com');

DELETE from customers where emailaddress = 'JA@gmail.com';

DELETE from ibeammac_iScan.sysseq_nextcustomerno  where identifier = 'JA@gmail.com';

DELETE from ibeammac_iScan.sysseq_nextscontract where refid = 'JA@gmail.com';

DELETE from ibeammac_iScan.sysseq_nextemployee where userid = 'JA@gmail.com';


delete from servcon where tkey in (select CKey 
FROM ibeammac_iScan.servconusers where EKey in 
	(Select tkey from employees where username =  'JA@gmail.com')
);

DELETE FROM ibeammac_iScan.servconusers where EKey in 
	(Select tkey from employees where username =  'JA@gmail.com');
	
delete from employees where username =  'JA@gmail.com';