The following is found in item "SELECT - SQL Command - SELECT Clause" in VFP9 help.
>Select_List_Item
>
>Specifies one or more items to match and include in the query results. Each item in list generates one column in the query results. Select_List_Item can specify the following items:
>
>(Subquery) Subquery specifies a SQL SELECT statement within another SQL SELECT statement and must be enclosed within parentheses (()). There is no limit on the number of subqueries per SQL SELECT statement. There is no limit on the nesting depth for subqueries in a SQL SELECT statement. You can use correlated subqueries up to the immediate parent. A correlated subquery uses fields in the parent query, and the subquery is executed for each candidate row in the parent query. Subqueries can contain TOPnExpr clauses for noncorrelated subqueries, multiple join conditions, and GROUP BY clauses. If a subquery does not return any records, it returns NULL.
Has anyone figured out if this can lead to a select statement that takes data from a table in which each row represents one data point and creates a wide cursor? I mean this:
DATA TABLE
id column_name value
10 January 100.00
10 March 50.00
12 February 200.00
RESULT TABLE (order of columns is a separate issue)
Id January February March
10 100.00 0.00 50.00
12 0.00 200.00 0.00
I hope it does...
Alex