Hoppa till huvudinnehållet

Running a Stored Procedure

Kommentarer

3 kommentarer

  • Zack Robison

    Have you tried the Run SQL Non-Query activity?  If you can't get that to run it, there's also a Run Python activity which provides about all of the server-side flexibility you can ask for, but you'll need a script for it of course.

    Note: these activities can easily poke holes in your data security.  Be certain that you aren't exposing yourself to SQL injection with them.

    0
  • Robert Pincus

    Thank you Zack. I was able to figure the problem out as I was returning the shape 
    field in the procedure. Once the shape field was removed the workflow runs fine. 

    My next question is how to do I set up the query to use variables?
    In the command text for the Run SQL Query, this statement works....
    exec usp_ROAD_CLOSURE_NAMES @STNAME = 'MAIN ST', @CITY = 'RIVERSIDE'

    For production, the STNAME and CITY are going to variables entered by the user.
    How do I replace MAIN ST and RIVERSIDE with variables?
    This does not work...
    exec usp_ROAD_CLOSURE_NAMES @CITY = '${$city.result}', @STNAME = '${$stname.result}'

     

    0
  • Berend Veldkamp

    @Robert The documentation contains information about how to include sql parameters

    1

Du måste logga in om du vill lämna en kommentar.