Hi!

>From my experience Query Results may be redirected to Array, Cursor, Table
& more options as required.

Usage

SELECT [ ALL | DISTINCT ]
       [ TOP nHowMany [ PERCENT ] ]
        eColumn1 [ AS ColumnName1 ]
             [, eColumn2 [ AS ColumnName2 ] ... ]
       FROM [ FORCE ]
            [ Database1! ]Table1 [ [ AS ] LocalAlias1 ]
              [ [ INNER | LEFT [ OUTER ] | RIGHT [ OUTER ]
               | FULL [ OUTER ] ] JOIN
               [ Database2! ]Table2 [ [ AS ] LocalAlias2 ]
                 [ ... ]
               [ ON lJoinCondition1 ]
               | , [ Database3! ]Table3 [ [ AS ] LocalAlias3 ]
                 [ ... ] ]
        [ WHERE lConditions ]
        [ GROUP BY GroupColumn1 [, GroupColumn2 ... ] ]
        [ HAVING lGroupFilter ]
        [ UNION [ ALL | DISTINCT ] SELECT ... ]
        [ ORDER BY OrderCriteria1 [ ASC | DESC ]
              [, OrderCriteria2 [ ASC | DESC ] ... ] ]
        [INTO CURSOR CursorName [ NOFILTER ] [ READWRITE ]
         | INTO TABLE | DBF TableName
         | INTO ARRAY ArrayName
         | TO FILE FileName [ ADDITIVE ]
         | TO PRINTER [ PROMPT ]
         | TO SCREEN ]
       [ PREFERENCE PreferenceName ]
       [ NOCONSOLE ]
       [ PLAIN ]
       [ NOWAIT ]


For detailed info check this out -
https://hackfox.github.io/section4/s4g088.html

--
Cheers!!!

*Srikanth Bhandari*
Fox/VFP/VB/VB.Net Developer

On Fri, Apr 15, 2022 at 7:13 AM MB Software Solutions, LLC <
mbsoftwaresoluti...@mbsoftwaresolutions.com> wrote:

> 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
>
[excessive quoting removed by server]

_______________________________________________
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/CAHyviJpFvTi5tqpRK=mdxA=eucor7jsjezmd93qz8gubivh...@mail.gmail.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