Home › Discussions › Questions & Answers › Best method converting other user’s SQL to Blitz using same Parameter on multiple locations in the SQL

Best method converting other user’s SQL to Blitz using same Parameter on multiple locations in the SQL

Avatar photoCustomer Questions & Answers 2 replies

I hope you can guide me, how to convert by copy/paste to Blitz in the quickest manner, using the same Parameter on multiple locations in the SQL.

Using &p_org_id multiple times (in SQL you only enter once), I would like to add only one Blitz Run time Parameter.

Attachments:

2 replies

  • Support Enginatics

    Hi,

    You could replace such placeholders from a &lexical to a :bind, as done in the attached example.

    &p_ou_id ->  :p_ou_id

    &p_org_id -> :p_org_id

    And then reference these directly in the parameters.

    Attachments:
  • Support Enginatics
    The downside of this approach, compared to 1=1 anchors, is that the multiple values functionality is not available for such direct :binds, as our current code would not be able to automatically replace the equal sign of the SQL query with an in-clause.
    Regards,
    Andy
  • You must be logged in to reply to this post.