Clay Icon

Table Lookup with Combined Filter Values in SQL

·
·

how can I do a table lookup based on 2 filter values combined? customerId == customerId && tenant == tentant for exmaple

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    To perform a table lookup using two combined filter values in Clay, you can use the "Lookup Multiple Rows in Other Table" action. Here's how: 1. Select the table you want to search in. 2. Choose your first filter column (e.g., "customerId"). 3. Set the filter operator (e.g., "equal to"). 4. Enter the value for the first filter. 5. Add a second filter by selecting the "AND" operator. 6. Choose your second filter column (e.g., "tenant"). 7. Set the filter operator for the second column. 8. Enter the value for the second filter. This will return rows that match both conditions. You can also set a limit on the number of rows returned if needed.

  • Avatar of Fabian H.
    Fabian H.
    ·
    ·

    there is no AND operator

  • Avatar of Bo (.
    Bo (.
    ·
    ·

    Hey, To do a table Lookup with two combined filter values, you can create a Formula column in both tables that merges customerId and tenant into a single string, like this: LBKSAdd /column and /column value separated by a commaLBKSThen use that new column as the match key in your Lookup. This way, the lookup runs on the combined values instead of just one. Let me know if you’d like help setting that up in your table!