ACC2002: The Upsizing Wizard Does Not Upsize Nested Queries If Base Queries Are Upsized as Functions (295235)
The information in this article applies to:
This article was previously published under Q295235 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
The Microsoft Access Upsizing Wizard does not upsize a nested query if both of the following conditions are true:
- The query includes a lower-level query that includes an ORDER BY clause in its SQL statement.
-and-
- The lower-level query is involved in more than one join.
CAUSE
The Upsizing Wizard converts queries with ORDER BY clauses to functions. Therefore, the lower-level query is converted to a function. When a function is involved in more than one join in a query, the Upsizing Wizard does not upsize the query.
RESOLUTION
To work around this problem, use one of the following methods.
Method 1
Copy and paste the SQL statement from the nested query in your Microsoft Access Database to a new query in the upsized Microsoft Access project. To do so, follow these steps:
- Open the database that contains the nested query.
- Open the nested query in Design view.
- On the View menu, click SQL View.
- Select the entire SQL statement so that you can copy it.
- On the Edit menu, click Copy.
- Close the query. Do not save the changes.
- Open the upsized Microsoft Access project.
- In the Database window, click Queries under Objects, and then double-click Create view in designer.
- In the Show Table dialog box, click Close.
- On the View Design toolbar, click SQL to open the SQL window at the bottom of the screen.
- In the SQL window, select the "SELECT FROM" text so that you can paste over the text.
- On the Edit menu, click Paste. If necessary, edit the query so that it conforms to the proper T-SQL syntax.
- Save the view and give it the same name as the query name in the Access database (.mdb) file.
- Run the query.
- Return to Design view.
- In the Sort Type column, select the sort order for the field that you want to sort by.
- Rerun the query.
- Close and save the query.
Method 2
Before upsizing your database, open the lower-level query in Design view, remove the sort order, and then reinsert the sort order in the upsized query.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 9/27/2003 |
---|
Keywords: | kbbug KB295235 |
---|
|