Copy saved SimplyReports to another user

This will copy all of one user’s reports to another user. This was last tested on Polaris 7.3.

declare @sourceUserId int = 707
declare @destUserId int = 447

begin tran

insert into Polaris.polaris.RWRITERSavedReports (ReportName, ReportDescription, ReportTypeID, OutputTypeID, PolarisUserID, ReportSQL, ReportMetaColumns, SharedFlag, CreationDate, LastRunDate, Enabled)
select r.ReportName
from Polaris.Polaris.RWRITERSavedReports r 
where r.PolarisUserID = @sourceUserId

-- Uncomment AFTER you run the main statement to either rollback or commit the changes; you MUST do one or the other