The table below illustrates how to convert the most popular MS Access built-in functions into MySQL equivalents:
Microsoft Access | MySQL |
asc | ascii |
chr | char |
date() | now() |
iif(condition, expr1, expr2) | if(condition, expr1, expr2) |
InStr(position, expr1, expr2) | locate(expr2, expr1, position) |
int | floor |
FormatDateTime(val,format) | format=0: DATE_FORMAT(val,'%Y-%m-%d %T'), format=1: DATE_FORMAT(val,'%Y-%m-%d'), format=2: DATE_FORMAT(val,'%y-%m-%d'), format=3: DATE_FORMAT(val,'%h:%i:%s'), format=4: DATE_FORMAT(val,'%H:%i:%s') |
lcase, lcase$ | lower |
len | lenth |
ltrim$ | ltrim |
nz(expr1, expr2) | ifnull(expr1, expr2) |
rtrim$ | rtrim |
sgn | sign |
str(val) | convert(val, char) |
ucase, ucase$ | upper |
Have questions? Contact us