Migrating String Functions from Access to SQL Server

This table shows the Microsoft® SQL Server™ equivalent function for each Microsoft Access function.

Access SQL Server
chr$(x) char(x)
asc(x) ascii(x)
str$(x) str(x)
space$( x) space(x)
lcase$(x) lower(x)
ucase$( x) upper(x)
len(x) datalength(x)
ltrim$( x) ltrim(x)
rtrim$(x) rtrim(x)
right$(x,y) right(x,y)
mid$(x,y,z) substring(x,y,z)

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.