Post AS9YnbYoTaBp85sMJk by nican@furry.engineer
(DIR) More posts by nican@furry.engineer
(DIR) Post #AS9YRBVCgBO9wNUqi8 by simon@fedi.simonwillison.net
2023-01-30T01:17:42Z
0 likes, 0 repeats
Very quick TIL: I figured out how to use VALUES syntax in a CTE in SQLite:with x(c1, c2, c3) as ( values ('a', 'b', 3), ('b', 'c', 4))select * from xHandy for if you need to join against some temporary data that you can include in the query itself - or just for writing demonstration queries.https://til.simonwillison.net/sqlite/cte-values
(DIR) Post #AS9YnbYoTaBp85sMJk by nican@furry.engineer
2023-01-30T01:22:02Z
0 likes, 0 repeats
@simon that is actually pretty cool. I wonder if it works with other dialects.
(DIR) Post #AS9aL06eKvFcldBt7w by jaywgraves@indieweb.social
2023-01-30T01:39:09Z
0 likes, 0 repeats
@simon I had a need for this earlier this week and also figured out the right syntax. (Except mine was a recursive CTE)