I've been watching a video tutorial called "Mastery with SQL" that uses
Postgres for the back end. At one point while talking about subqueries the
instructor runs the following SQL query:
SELECT * FROM (values ('short', 0, 60), ('medium', 60, 120), ('long', 120,
10000)) as c("desc", "min", "max");
This query more or less creates a table and then selects everything out of
it. Not very useful on its own but could be handy when joined up to a real
table. I get a syntax error running this in Visual Foxpro 9 so I was
wondering if the syntax can be changed so that it will work, or is this
type of query even possible with Visual Foxpro? I think it could be done
with a create cursor statement ahead of the query but I'm just curious if
it can be done with a one-liner. FYI the query as-is works in Postgres but
not VFP, Sqlite, or Mysql (at least the versions I have on my machine).
--
Jeff Roberts | jefflroberts(a)gmail.com
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---