title: Stored proc to remove records older than N days
body: <p>I want to create a two stored procedures that will remove records older than N days from a stgging database.</p>
  
  <p>Both stored proc will call in a package to cleanup data older than N days.</p>
  
  <p>Stored proc A will remove records from table <code>A.Fullimport</code> &amp; stored proc B will remove records from table <code>B.weeklyimport</code>.</p>
  
  <p>The same stored proc will remove all records from error table where there is not a record in table x and table Y.</p>
  
  <p>Both stored proc will accept input variable <code>@Cleanupdays</code>.</p>