Do you remove VBA function names in queries before upsizing queries (Upsizing problem)?
Updated by Brady Stroud [SSW] 1 year ago. See history
123
The Upsizing Tools do not try to upsize Microsoft Access query that includes VBA function names that don't have their equivalent Transact-SQL functions. The upsizing result will depend on Microsoft Access version (2000/2002/2003) and SQL Server Version (2000/2005). The following varieties of queries will not upsize:
- Queries referencing value in control, for example Forms![FormName]![ControlName] (Access 2000)
- Select queries that take parameters (Access 2000)
- Select queries where parameter used more than once (All versions of Access)
- Select queries referencing Format function (All versions of Access)
You have to manually edit SQL definition in Microsoft Access (remove or replace keyword) and modify view/stored procedure/function T-SQL in SQL Server after upsizing.
SELECT Orders.OrderID,"Order Subtotals".Subtotal,FORMAT (ShippedDate,'yyyy') AS YearFROM OrdersINNER JOIN "Order Subtotals"ON (Orders.OrderID="Order Subtotals".OrderID);
❌ Figure: Figure: Bad example of Access query with FORMAT keyword
SELECT Orders.OrderID,"Order Subtotals".Subtotal,YEAR (ShippedDate) AS [Year]FROM OrdersINNER JOIN "Order Subtotals"ON (Orders.OrderID="Order Subtotals".OrderID)
✅ Figure: Figure: Good example of SQL Server view with YEAR keyword
::: yellowBox Upsizing PRO will check this rule
:::