DECLARE @from AS VARCHAR(5) = 59921 --lskin you are getting rid of
DECLARE @to AS VARCHAR(5) = 4718 --lskin you are keeping
--find LINES in original account
SELECT *
FROM dnis
WHERE add_lskinid = @from
--find EVENTS in original account
SELECT *
FROM go.dbo.gevent
WHERE frn_lskinid = @from
--find CONTACTS in original account
SELECT *
FROM go.dbo.lskin_contact
WHERE frn_lskinid = @from
--find USERS in original account
SELECT *
FROM leuser
WHERE frn_lskinid = @from
--find AXREPORTS in original account
SELECT *
FROM axreport
WHERE frn_lskinid = @from
--find PROPERTIES for both old and new
SELECT *
FROM lskinproperty
WHERE frn_lskinid in (@from,@to)