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 December 28, 2024 at 9:20 pm

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:
Viewing 1 reply thread
  • Author
    Replies
    • Support December 29, 2024 at 8:04 am  

      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 December 29, 2024 at 9:04 pm  
      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
Viewing 1 reply thread
  • You must be logged in to reply to this post.

Login with: