ANSI ODBC Scalar Functions

The following lists the ANSI standard ODBC scalar functions and their equivalents for VBA-based data sources and SQL Server

ANSIVBASQLDescription
AbsAbsAbsabsolute value
AcosAcosarc cosine
AsciiAscAsciiconverts a single char to an ASCII numeric value
AsinAsinarc sine
AtanAtnAtanarc tangent of angle
Atan2Atn2arc tangent of two values
Bit_Lengthlength in bits of binary value
CastCastgeneral type conversion
CeilingCeilingleast integer greater than or equal
CharChrCharconverts an ASCII numeric value to a single char
Char_LengthLenLengthlength in characters of string
Concat&+concatenate two strings
ConvertConvertgeneral type conversion
CosCosCoscosine of angle
CotCotcotangent of angle
Current_DateDatecurrent date
Current_TimeTimecurrent time
Current_TimestampNowGetDatecurrent date and time
DatabaseDB_Namedatabase name
DayNamename of day of week
DayOfMonthDayDaynumeric day of month
DayOfWeekWeekdaynumeric day of week
DayOfYearnumeric day of year
DegreesDegreesconverts an angle in radians to degrees
DifferenceDifferencefuzzy string comparison
ExpExpExpnatural exponentiation
Extractextract field from timestamp
FloorIntFloorgreatest integer less than or equal
HourHournumeric hour of day
IfNullIsNullreturns first non-null value
Insert
LCaseLCaseLowerlowercase string
LeftLeftLeftsubstring from left side of a string
Lengthlength in bytes of right-trimmed string
LocateInStrCharIndexsearches for a substring
LogLogLognatural logarithm
Log10Log10base 10 logarithm
LTrimLTrimLTrimtrims whitespace from left side of string
MinuteMinutenumeric minute of hour
ModMod%modulo of x base y
MonthMonthMonthnumeric month value
MonthNamename of month
Octet_Lengthlength in octets of value
PiPivalue of pi
Position
Power^Powerexponentiation
Quarternumeric quarter of year
RadiansRadiansconverts an angle in degrees into radians
RandRndrandom value
RepeatStringReplicategenerates n repeated characters
Replacestring replacement
RightRightsubstring from right part of string
RoundRoundRoundround to an integer value
RTrimRTrimRTrimtrims whitespace from right side of string
SecondSecondnumeric second value
SignSgnSignarithmetic sign of value
SinSinSinsine
SoundExSoundExgenerates hash of text string
SpaceSpaceSpacegenerate n spaces
SqrtSqrSqrtsquare root
SubStringMidSubStringmiddle part of string extraction
TanTanTantangent of angle
TimestampDiffdifference between two timestamps
UCaseUCaseUpperuppercase string
UserUser_Nameuser name
Weeknumeric week of year
YearYearYearnumeric year value