PRB: Aliased Field Not Saved in Query DesignerLast reviewed: March 27, 1996Article ID: Q138661 |
The information in this article applies to:
SYMPTOMSIf the AS clause is used to rename a field in the Query or View designer, it will be lost when the Query or View is reopened. As long as the Query or View is created and saved, the AS clause remains and works correctly. If the Query or View is modified, then the AS clause will disappear.
WORKAROUNDA query can be created with FoxPro's SELECT - SQL statement. The following example will create a query.
SELECT <tablename.fieldname> AS custom_name FROM ; <tablename> INTO CURSOR querynameA view can be created with FoxPro's CREATE SQL VIEW statement. The following example will create a local view.
CREATE SQL VIEW mysqlview AS SELECT <tablename.fieldname> AS ; custom_name FROM <database container.tablename>Instead of opening the Query or View designer and losing the AS clause, the code can be changed in a .prg file.
STATUSMicrosoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONIn the Query or View designer, a field can be assigned another name using the AS clause. This is done under the Fields tab in the Functions/Expressions box. Typing the field name and adding the AS clause with a name after it gives the field the name that follows the AS clause. For example,
customer.cust_id AS Customer_Idgives the field customer.cust_id the name of Customer_Id when browsed.
Steps to Reproduce BehaviorCreating a Query:
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |