ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel2000: Calculated field name in ODBC Query (https://www.excelbanter.com/excel-discussion-misc-queries/75875-excel2000-calculated-field-name-odbc-query.html)

Arvi Laanemets

Excel2000: Calculated field name in ODBC Query
 
Hi

I have a workbook with several ODBC queries from another Excel workbook. The
queries differ by WHERE condition. In general, query syntaxes are like
SELECT a.field1, a.field2, SUM(a.field3) AS 'Field3'
FORM `Drive:\Path\SourceWorkbook`.SourceTable a
WHERE ....
GROUP BY a.field1, a.field2
ORDER BY a.field2, a.field1;

My problem is, that for some queries AS fieldname part is working, i.e. in
return table the header for 3rd column is 'Field3', and in query window I
can activate from menu RecordsEditColumn, for some of then sometimes isn't.
When I close query window for such query, the query syntax changes to
SELECT a.field1, a.field2, SUM(a.field3)
FORM `Drive:\Path\SourceWorkbook`.SourceTable a
WHERE ....
GROUP BY a.field1, a.field2
ORDER BY a.field2, a.field1;

in return table the column header will be Expr####, and RecordsEditColumn
in query wizard menu is disabled.

Has someone some plausable explanation for such behaviour. And how to mend
it?


Thanks in advance!
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )





All times are GMT +1. The time now is 07:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com