I have an Access application that is the front end to a SQL Server DB. The app includes a search form that has 5 combo boxes that filter the records. The combos are currently populated by Access union "ALL" queries that take a while to load. I'm trying to speed up the loading of the form by using SQL Server views instead of queries.
This query that works in Access:
SELECT tblVendor.VendID, tblVendor.VendName FROM tblVendor UNION Select '*' as VendID, '(All)' as VendName FROM tblVendor
ORDER BY tblVendor.VendName;
returns this SQL Server error:
sql server conversion failed when converting the varchar value '*' to data type int (#245)
VendID is an integer. How can I make this query into a view that works?
Thanks,
Sup
This query that works in Access:
SELECT tblVendor.VendID, tblVendor.VendName FROM tblVendor UNION Select '*' as VendID, '(All)' as VendName FROM tblVendor
ORDER BY tblVendor.VendName;
returns this SQL Server error:
sql server conversion failed when converting the varchar value '*' to data type int (#245)
VendID is an integer. How can I make this query into a view that works?
Thanks,
Sup