Dynamic SQL statement

Rob Berry
Rob Berry Member
edited December 2023 in General

I've set up a re-usable workflow. I'm trying to set up a dynamic SQL statement to execute in the pre SQL setting of an Export step.

Is it possible to assign a Workflow Parameter to a setting in a step?

Best Answer

  • Henry Simms
    Henry Simms Administrator
    Answer ✓

    Hi @Rob Berry , it's not possible to pass a parameter into the Export step's pre-SQL statement currently, although workflow params can be used elsewhere in the step (in file names if exporting to file). I can think of a few reasons why you might want to use a dynamic pre-SQL statement, but would you be able to explain at a high level what you were hoping to do, to help us prioritise this sort of functionality in future? There may also be an alternative approach that can be used today.



  • Rob Berry

    thanks Henry

    I'm wanting to delete a specific set of rows from a table based. I've created a re-usable workflow and the delete behaviour is dependent on the workflow that it is imbedded in.

    I've thought of another way of achieving the same outcome. from the higher level workflow I think I'll write a row to a database table, containing details on the delete condition. This can then be used by a stored proc in the data base to perform the delete, which I'll call from the pre SQL in the re-usable workflow.

    Pretty much a throw from the higher level workflows and a catch by the re-usable workflow.