[Special Characters][A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z]
Often I need to get a list of results where a query is in a particular set. The following would be the syntax in postmodern sql where the set is a list. If you want to use a vector, then you need to use Any:
The following are equivalent
However, the following will generate an error about inability to convert to an sql literal
Now with selecting a dao
Now with selecting from a vector. Note both the use of any* and := instead of :in.
Note that the responses are still coming back in a list of lists
If you are trying to use a list in a parametized statement, you can't. You have to convert the list to a vector and use "any" rather than "in." See example in Parametized Statements
String_agg returns a string containging the values returned, separated by a delimiter. In the following example, we are searching for the name of all the regions in the regions table and we want it all returned as a single string with a delimiting comma.
Postmodern examples >