Using Wildcards in a Parameterized Queries

Using Wildcards in a Parameterized Queries

Comments

  • Adding onto Kenans reply on Parameterized Queries and providing useful documentation as well that you can reference further for the subject:
    [url=https://documentation.decisions.com/docs/parameterized-queries]Parameterized Queries[/url]
    [url=https://documentation.decisions.com/docs/fetch-entities-criteria-and-sql-equivalence]Fetch Entities Criteria and SQL Equivalence[/url]

    Both will allow you to use a customizable query to retrieve a result. Fetch entity steps are easier to implement, but will grab the entire object it is querying by default if you ever want to use this option. You can use the contains options on the Fetch Entities step to replicate a simple wildcard like behaviour. Its easy from there to trim down what you may need from your list of results, such as when selecting the list of the object from the flow, selecting First, and then selecting the specific column you wanted to map into a result variable you have in your flow if you only want the first result retrieved from this query. Parametrized SQL queries will of course have the most customization of exactly what you want to get as a result from your query, such as grabbing only a specific column, or if you want a stricter wildcard parameter.

    As an extra note, you cannot test parameterized queries within the Query Editor; its meant to be used only for simple queries so you need to test with those two options provided above.

Sign In or Register to comment.