Want to retrieve records from Access through linked server in SQL Server and need to convert/cast the column with VARCHAR
for some constraint.
My attempt:
SELECT Cola, Colb
FROM MSAccess_LinkedServer...TableName
WHERE CAST([Cola] AS VARCHAR) = 'A123'
Unable to get the result from above query.
But when I remove CAST
then I will get the result, but I want to know how to put the cast/convert
.
No casting should be needed for text. How about simply:
WHERE [Cola] = 'A123'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.