dynamic where from array syntax? #529
Replies: 2 comments 8 replies
-
That's excellent! Thanks for helping me get the rest of the way on this. Your first idea worked for me perfectly. I have a web page with a table displaying unknown data. The user needs to be able to filter by any of the columns, so the keys are completely dynamic. Hence, the |
Beta Was this translation helpful? Give feedback.
-
hello @e3dio , Sorry but I have some case. I have a sub query and I can not build the query with that. case 1: case2: Could you help to to review them? Thank you @e3dio , @scottwillman ! |
Beta Was this translation helpful? Give feedback.
-
Try as I might, I haven't yet gotten the hang of the string interpolation syntax here. I'm trying to dynamically insert some
where
statements for some JSON data. Here's a minimal example of what I'm trying, perhaps someone can spot my mistake. Please see the attempt (1 of many) at inserting the filters dynamically${sql`${filters.join(' ')}`}
. FWIW this query works in a DataGrip console.Error
PostgresError: syntax error at or near "$2"
Thank you!!!
Beta Was this translation helpful? Give feedback.
All reactions