PRB: Aliased Field Not Saved in Query DesignerID: Q138661 3.00 WINDOWS kbtool kbprb 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.
A view can be created with FoxPro's CREATE SQL VIEW statement. The
following example will create a local view.
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,
gives the field customer.cust_id the name of Customer_Id when browsed.
Steps to Reproduce BehaviorCreating a Query: 1. Select the File menu pad and choose New. Click the Query radio button 2. Choose the Fields tab and type the name of a field from the table in the
3. Click the Add button to place the expression In the Selected Output
4. Run the query, and note that the field has the title of "custom_name."
Creating a View:
1. A database container must be open to create a view and it has to be 2. From the File menu, click New. Click the View radio button, and then
3. Click the Fields tab and type the name of a field from the table in the
4. Click the Add button to place the expression In the Selected Output
5. Run the view and note that the field has the title of "custom_name."
Additional reference words: 3.00 VFoxWin
KBCategory: kbtool kbprb
KBSubcategory: FxtoolQueryvwdes
|
Last Reviewed: March 28, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |