Skip to main content

I have a generic stored procedure that does some custom post processing based on the table that has just been reloaded (Executed).  The stored procedure takes a parameter "TableName".  I've created a Script Action that executes the stored procedure.  I need this Script Action to run as a Post Step after the last execution step is run for one of several tables.  I can create one script action per table with the tablename hardcoded, but I've got a lot of tables to work with and would really prefer do this as a parameter containing the current table name.  Is the currently executing table name available in a system parameter somewhere and/or is there a way to create one that can be referenced by a script action?

Hi Larry, the below solution is about as close as you can get to what you are looking for: 

  1. Create a SQL Snippet & parameterize the TableName in the snippet.
  2. Create a script action from the SQL snippet, and map the table to the parameter once for that snippet. (this will replace all instances of the parameter with the actual table name) Just be sure you specify the table variant (Raw or Valid table).
  3. Repeat step 2 for each table.

 


Is this still the only way to handle 1 procedure to multiple tables (timextender classic)?

Hi Larry, the below solution is about as close as you can get to what you are looking for: 

  1. Create a SQL Snippet & parameterize the TableName in the snippet.
  2. Create a script action from the SQL snippet, and map the table to the parameter once for that snippet. (this will replace all instances of the parameter with the actual table name) Just be sure you specify the table variant (Raw or Valid table).
  3. Repeat step 2 for each table.

 

 

 


Hi @malkn 


Yes. If you want to reuse a script, creating it as a snippet with this option is the way to do it.

Is there some issue this does not resolve?


No, I don’t think so, all is good.


Reply