Intersecting multiple queries
Hamish Allan <[email protected]> Fri, 28 Feb 2020 23:02:17 +0000
| Newsgroups | gmane.comp.db.sqlite.general |
|---|---|
| Message-ID | <CAAY-9bxLUxR+WFcxZ9hO5Wo8LBbpijh1++YYGvEN_TXPnMqF6w@mail.gmail.com> |
Hi, I am building a list of UUIDs from multiple queries of the form: SELECT uuid FROM Data WHERE filter LIKE ? with a different bound parameter each time. In app-space code, I'm getting the results of these queries and intersecting them, so that the final list contains only UUIDs returned by all of the queries. I'm then populating a temporary table so that a further query can return only rows matching those UUIDs. What I'm wondering is if there's a shortcut to avoid having to build the UUID list in app code -- whether I can perform an intersection in a query to build that temporary table without involving app-space code. Or even avoid having to build the temporary table at all? Many thanks, Hamish _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users