Im trying to use SSMA to migrate my Access queries over to views but Im getting TONS of errors, which is racking up an estimated 66 hours of manual conversion time.
The biggest offenders are the following two:
A2SS0069: External variable cannot be converted
and
A2SS0061: The identifier 'Format(UNKNOWN, VARCHAR)' was not converted.
Now, the second one, the format function, I can deal with. Im just going to have to kill that line, but the other error, the External variable error is weird because as far as I can tell, the external variable is just a reference to another table in the same db. Ive checked over a few of the query/views and everything referenced is located in other tables in the same DB.
Here is an example of my Access query:
SELECT AcuteHospitals.HospitalName,
Sum(
IIf(
[Quarterly CLABSI Numbers by Hospital]![Number of CLABSI] Is Null,
"--",
[Quarterly CLABSI Numbers by Hospital]![Number of CLABSI])
) AS CLABSI,
Sum(
IIf(
[Quarterly CLABSI Numbers by Hospital]![Central Line Days] Is Null,
"--",
IIf(
[Quarterly CLABSI Numbers by Hospital]![Central Line Days]=0,
0,
Format([Quarterly CLABSI Numbers by Hospital]![Central Line Days],"#,###")
)
)
) AS CLD, [Quarterly CLABSI Numbers by Hospital].SizeCat, [Quarterly CLABSI Numbers by Hospital].BedSize
FROM AcuteHospitals
LEFT JOIN [Quarterly CLABSI Numbers by Hospital] ON AcuteHospitals.HospitalName=[Quarterly CLABSI Numbers by Hospital].HospitalName
WHERE ((([Quarterly CLABSI Numbers by Hospital].SummaryYQ) In ("2010Q1","2010Q2")))
GROUP BY AcuteHospitals.HospitalName, [Quarterly CLABSI Numbers by Hospital].SizeCat, [Quarterly CLABSI Numbers by Hospital].BedSize
ORDER BY AcuteHospitals.HospitalName;
And SSMA spits out:
/*
* SSMA warning messages:
* A2SS0030: View '2010Q1-Q2 CLABSI Rate by Hospitalstep1' has a name that might cause problems for the Access application to function correctly against SQL Server.
*/
/*
* SSMA error messages:
* A2SS0069: External variable cannot be converted.
* A2SS0069: External variable cannot be converted.
* A2SS0069: External variable cannot be converted.
* A2SS0069: External variable cannot be converted.
* A2SS0061: The identifier 'Format(UNKNOWN, VARCHAR)' was not converted.
SELECT TOP 9223372036854775807 WITH TIES
[AcuteHospitals].[HospitalName],
Sum((
CASE
WHEN IS NULL THEN '--'
ELSE
END)) AS CLABSI,
Sum((
CASE
WHEN IS NULL THEN '--'
ELSE (
CASE
WHEN = 0 THEN 0
ELSE [Quarterly CLABSI Numbers by Hospital].[Central Line Days]
END)
END)) AS CLD,
[Quarterly CLABSI Numbers by Hospital].[SizeCat],
[Quarterly CLABSI Numbers by Hospital].[BedSize]
FROM
[AcuteHospitals]
LEFT JOIN [Quarterly CLABSI Numbers by Hospital]
ON [AcuteHospitals].[HospitalName] = [Quarterly CLABSI Numbers by Hospital].[HospitalName]
WHERE ((([Quarterly CLABSI Numbers by Hospital].[SummaryYQ]) IN ( '2010Q1', '2010Q2' )))
GROUP BY [AcuteHospitals].[HospitalName], [Quarterly CLABSI Numbers by Hospital].[SizeCat], [Quarterly CLABSI Numbers by Hospital].[BedSize]
ORDER BY [AcuteHospitals].[HospitalName]
*/
GO
So SSMA doesnt like the [Quarterly CLABSI Numbers by Hospital]![Number of CLABSI] inside those iif statements. so I need to wrap the variable names in quotes?