The short answer (as you've seen firsthand):  No, you cannot do that.

You can do subqueries like this:

select * from MySource where id in (select id from SomeOtherSource where condition=whatever)


On 4/15/2022 9:49 AM, Jeff Roberts wrote:
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).

--
Michael J. Babcock, MCP
Fox/VFP dev since 1997
Developer of FabNet estimating software - mbsoftwaresolutions.com

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/cb586fe1-6afa-7137-2c2d-dfa047b38...@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to