# SqlFunctionsSqlFunctionsSqlFunctions Class

## Definition

Contains function stubs that expose SqlServer methods in Linq to Entities.

``public static class SqlFunctions``
``type SqlFunctions = class``
``Public Class SqlFunctions``
Inheritance
SqlFunctionsSqlFunctionsSqlFunctions

## Methods

 Acos(Nullable) Acos(Nullable) Acos(Nullable) A mathematical function that returns the angle, in radians, whose cosine is the specified numerical value. This angle is called the arccosine. Acos(Nullable) Acos(Nullable) Acos(Nullable) A mathematical function that returns the angle, in radians, whose cosine is the specified numerical value. This angle is called the arccosine. Ascii(String) Ascii(String) Ascii(String) Returns the ASCII code value of the left-most character of a character expression. Asin(Nullable) Asin(Nullable) Asin(Nullable) A mathematical function that returns the angle, in radians, whose sine is the specified numerical value. This angle is called the arcsine. Asin(Nullable) Asin(Nullable) Asin(Nullable) A mathematical function that returns the angle, in radians, whose sine is the specified numerical value. This angle is called the arcsine. Atan(Nullable) Atan(Nullable) Atan(Nullable) A mathematical function that returns the angle, in radians, whose tangent is the specified numerical value. This angle is called the arctangent. Atan(Nullable) Atan(Nullable) Atan(Nullable) A mathematical function that returns the angle, in radians, whose tangent is the specified numerical value. This angle is called the arctangent. Atan2(Nullable, Nullable) Atan2(Nullable, Nullable) Atan2(Nullable, Nullable) Returns the positive angle, in radians, between the positive x-axis and the ray from the origin through the point (x, y), where x and y are the two specified numerical values. The first parameter passed to the function is the y-value and the second parameter is the x-value. Atan2(Nullable, Nullable) Atan2(Nullable, Nullable) Atan2(Nullable, Nullable) Returns the positive angle, in radians, between the positive x-axis and the ray from the origin through the point (x, y), where x and y are the two specified numerical values. The first parameter passed to the function is the y-value and the second parameter is the x-value. Char(Nullable) Char(Nullable) Char(Nullable) Returns the character that corresponds to the specified integer ASCII value. CharIndex(String, String, Nullable) CharIndex(String, String, Nullable) CharIndex(String, String, Nullable) Returns the starting position of one expression found within another expression. CharIndex(Byte[], Byte[], Nullable) CharIndex(Byte[], Byte[], Nullable) CharIndex(Byte[], Byte[], Nullable) Returns the starting position of one expression found within another expression. CharIndex(String, String, Nullable) CharIndex(String, String, Nullable) CharIndex(String, String, Nullable) Returns the starting position of one expression found within another expression. CharIndex(String, String) CharIndex(String, String) CharIndex(String, String) Returns the starting position of one expression found within another expression. CharIndex(Byte[], Byte[]) CharIndex(Byte[], Byte[]) CharIndex(Byte[], Byte[]) Returns the starting position of one expression found within another expression. CharIndex(Byte[], Byte[], Nullable) CharIndex(Byte[], Byte[], Nullable) CharIndex(Byte[], Byte[], Nullable) Returns the starting position of one expression found within another expression. Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(String, String, String) Checksum(String, String, String) Checksum(String, String, String) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Byte[], Byte[], Byte[]) Checksum(Byte[], Byte[], Byte[]) Checksum(Byte[], Byte[], Byte[]) Returns the checksum value computed over the input arguments. Checksum(String, String) Checksum(String, String) Checksum(String, String) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Checksum(Nullable, Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Byte[]) Checksum(Byte[]) Checksum(Byte[]) Returns the checksum value computed over the input argument. Checksum(Nullable) Checksum(Nullable) Checksum(Nullable) Returns the checksum value computed over the input argument. Checksum(Nullable) Checksum(Nullable) Checksum(Nullable) Returns the checksum value computed over the input argument. Checksum(Nullable) Checksum(Nullable) Checksum(Nullable) Returns the checksum value computed over the input argument. Checksum(Nullable) Checksum(Nullable) Checksum(Nullable) Returns the checksum value computed over the input argument. Checksum(Nullable) Checksum(Nullable) Checksum(Nullable) Returns the checksum value computed over the input argument. Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable) Checksum(Nullable) Checksum(Nullable) Returns the checksum value computed over the input argument. Checksum(String) Checksum(String) Checksum(String) Returns the checksum value computed over the input argument. Checksum(Byte[], Byte[]) Checksum(Byte[], Byte[]) Checksum(Byte[], Byte[]) Returns the checksum value computed over the input arguments. Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Checksum(Nullable, Nullable) Returns the checksum value computed over the input arguments. Checksum(Nullable) Checksum(Nullable) Checksum(Nullable) Returns the checksum value computed over the input argument. ChecksumAggregate(IEnumerable) ChecksumAggregate(IEnumerable) ChecksumAggregate(IEnumerable) Returns the checksum of the values in a collection. Null values are ignored. ChecksumAggregate(IEnumerable>) ChecksumAggregate(IEnumerable>) ChecksumAggregate(IEnumerable>) Returns the checksum of the values in a collection. Null values are ignored. Cos(Nullable) Cos(Nullable) Cos(Nullable) Returns the trigonometric cosine of the specified angle, in radians, in the specified expression. Cos(Nullable) Cos(Nullable) Cos(Nullable) Returns the trigonometric cosine of the specified angle, in radians, in the specified expression. Cot(Nullable) Cot(Nullable) Cot(Nullable) A mathematical function that returns the trigonometric cotangent of the specified angle, in radians. Cot(Nullable) Cot(Nullable) Cot(Nullable) A mathematical function that returns the trigonometric cotangent of the specified angle, in radians. CurrentTimestamp() CurrentTimestamp() CurrentTimestamp() Returns the current date and time. CurrentUser() CurrentUser() CurrentUser() Returns the name of the current user. DataLength(Byte[]) DataLength(Byte[]) DataLength(Byte[]) Returns the number of bytes used to represent any expression. DataLength(Nullable) DataLength(Nullable) DataLength(Nullable) Returns the number of bytes used to represent any expression. DataLength(Nullable) DataLength(Nullable) DataLength(Nullable) Returns the number of bytes used to represent any expression. DataLength(Nullable) DataLength(Nullable) DataLength(Nullable) Returns the number of bytes used to represent any expression. DataLength(Nullable) DataLength(Nullable) DataLength(Nullable) Returns the number of bytes used to represent any expression. DataLength(Nullable) DataLength(Nullable) DataLength(Nullable) Returns the number of bytes used to represent any expression. DataLength(Nullable) DataLength(Nullable) DataLength(Nullable) Returns the number of bytes used to represent any expression. DataLength(Nullable) DataLength(Nullable) DataLength(Nullable) Returns the number of bytes used to represent any expression. DataLength(String) DataLength(String) DataLength(String) Returns the number of bytes used to represent any expression. DateAdd(String, Nullable, String) DateAdd(String, Nullable, String) DateAdd(String, Nullable, String) Returns a new datetime value based on adding an interval to the specified date. DateAdd(String, Nullable, Nullable) DateAdd(String, Nullable, Nullable) DateAdd(String, Nullable, Nullable) Returns a new time span value based on adding an interval to the specified time span. DateAdd(String, Nullable, Nullable) DateAdd(String, Nullable, Nullable) DateAdd(String, Nullable, Nullable) Returns a new date value based on adding an interval to the specified date. DateAdd(String, Nullable, Nullable) DateAdd(String, Nullable, Nullable) DateAdd(String, Nullable, Nullable) Returns a new datetime value based on adding an interval to the specified date. DateDiff(String, String, String) DateDiff(String, String, String) DateDiff(String, String, String) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, String, Nullable) DateDiff(String, String, Nullable) DateDiff(String, String, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, String, Nullable) DateDiff(String, String, Nullable) DateDiff(String, String, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, String, Nullable) DateDiff(String, String, Nullable) DateDiff(String, String, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, String) DateDiff(String, Nullable, String) DateDiff(String, Nullable, String) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, String) DateDiff(String, Nullable, String) DateDiff(String, Nullable, String) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, String) DateDiff(String, Nullable, String) DateDiff(String, Nullable, String) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) DateDiff(String, Nullable, Nullable) Returns the count of the specified datepart boundaries crossed between the specified start date and end date. DateName(String, String) DateName(String, String) DateName(String, String) Returns a character string that represents the specified datepart of the specified date. DateName(String, Nullable) DateName(String, Nullable) DateName(String, Nullable) Returns a character string that represents the specified datepart of the specified date. DateName(String, Nullable) DateName(String, Nullable) DateName(String, Nullable) Returns a character string that represents the specified datepart of the specified date. DateName(String, Nullable) DateName(String, Nullable) DateName(String, Nullable) Returns a character string that represents the specified datepart of the specified date. DatePart(String, Nullable) DatePart(String, Nullable) DatePart(String, Nullable) Returns an integer that represents the specified datepart of the specified date. DatePart(String, Nullable) DatePart(String, Nullable) DatePart(String, Nullable) Returns an integer that represents the specified datepart of the specified date. DatePart(String, Nullable) DatePart(String, Nullable) DatePart(String, Nullable) Returns an integer that represents the specified datepart of the specified date. DatePart(String, String) DatePart(String, String) DatePart(String, String) Returns an integer that represents the specified datepart of the specified date. Degrees(Nullable) Degrees(Nullable) Degrees(Nullable) Returns the corresponding angle in degrees for an angle specified in radians. Degrees(Nullable) Degrees(Nullable) Degrees(Nullable) Returns the corresponding angle in degrees for an angle specified in radians. Degrees(Nullable) Degrees(Nullable) Degrees(Nullable) Returns the corresponding angle in degrees for an angle specified in radians. Degrees(Nullable) Degrees(Nullable) Degrees(Nullable) Returns the corresponding angle in degrees for an angle specified in radians. Difference(String, String) Difference(String, String) Difference(String, String) Returns an integer value that indicates the difference between the SOUNDEX values of two character expressions. Exp(Nullable) Exp(Nullable) Exp(Nullable) Returns the exponential value of the specified float expression. Exp(Nullable) Exp(Nullable) Exp(Nullable) Returns the exponential value of the specified float expression. GetDate() GetDate() GetDate() Returns the current database system timestamp as a datetime value without the database time zone offset. This value is derived from the operating system of the computer on which the instance of SQL Server is running. GetUtcDate() GetUtcDate() GetUtcDate() Returns the current database system timestamp as a datetime value. The database time zone offset is not included. This value represents the current UTC time (Coordinated Universal Time). This value is derived from the operating system of the computer on which the instance of SQL Server is running. HostName() HostName() HostName() Returns the workstation name. IsDate(String) IsDate(String) IsDate(String) Indicates whether the input value is a valid date or time. IsNumeric(String) IsNumeric(String) IsNumeric(String) Indicates whether the input value is a valid numeric type. Log(Nullable) Log(Nullable) Log(Nullable) Returns the natural logarithm of the specified input value. Log(Nullable) Log(Nullable) Log(Nullable) Returns the natural logarithm of the specified input value. Log10(Nullable) Log10(Nullable) Log10(Nullable) Returns the base-10 logarithm of the specified input value. Log10(Nullable) Log10(Nullable) Log10(Nullable) Returns the base-10 logarithm of the specified input value. NChar(Nullable) NChar(Nullable) NChar(Nullable) Returns the Unicode character with the specified integer code, as defined by the Unicode standard. PatIndex(String, String) PatIndex(String, String) PatIndex(String, String) Returns the starting position of the first occurrence of a pattern in a specified expression, or zeros if the pattern is not found, on all valid text and character data types. Pi() Pi() Pi() Returns the constant value of pi. QuoteName(String) QuoteName(String) QuoteName(String) Returns a Unicode string with the delimiters added to make the input string a valid Microsoft SQL Server delimited identifier. QuoteName(String, String) QuoteName(String, String) QuoteName(String, String) Returns a Unicode string with the delimiters added to make the input string a valid Microsoft SQL Server delimited identifier. Radians(Nullable) Radians(Nullable) Radians(Nullable) Returns the radian measure corresponding to the specified angle in degrees. Radians(Nullable) Radians(Nullable) Radians(Nullable) Returns the radian measure corresponding to the specified angle in degrees. Radians(Nullable) Radians(Nullable) Radians(Nullable) Returns the radian measure corresponding to the specified angle in degrees. Radians(Nullable) Radians(Nullable) Radians(Nullable) Returns the radian measure corresponding to the specified angle in degrees. Rand() Rand() Rand() Returns a pseudo-random float value from 0 through 1, exclusive. Rand(Nullable) Rand(Nullable) Rand(Nullable) Returns a pseudo-random float value from 0 through 1, exclusive. Replicate(String, Nullable) Replicate(String, Nullable) Replicate(String, Nullable) Repeats a string value a specified number of times. Sign(Nullable) Sign(Nullable) Sign(Nullable) Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. Sign(Nullable) Sign(Nullable) Sign(Nullable) Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. Sign(Nullable) Sign(Nullable) Sign(Nullable) Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. Sign(Nullable) Sign(Nullable) Sign(Nullable) Returns the positive (+1), zero (0), or negative (-1) sign of the specified expression. Sin(Nullable) Sin(Nullable) Sin(Nullable) Returns the trigonometric sine of the specified angle. Sin(Nullable) Sin(Nullable) Sin(Nullable) Returns the trigonometric sine of the specified angle. SoundCode(String) SoundCode(String) SoundCode(String) Converts an alphanumeric string to a four-character (SOUNDEX) code to find similar-sounding words or names. Space(Nullable) Space(Nullable) Space(Nullable) Returns a string of repeated spaces. Square(Nullable) Square(Nullable) Square(Nullable) Returns the square of the specified number. Square(Nullable) Square(Nullable) Square(Nullable) Returns the square of the specified number. SquareRoot(Nullable) SquareRoot(Nullable) SquareRoot(Nullable) Returns the square root of the specified number. SquareRoot(Nullable) SquareRoot(Nullable) SquareRoot(Nullable) Returns the square root of the specified number. StringConvert(Nullable) StringConvert(Nullable) StringConvert(Nullable) Returns character data converted from numeric data. StringConvert(Nullable) StringConvert(Nullable) StringConvert(Nullable) Returns character data converted from numeric data. StringConvert(Nullable, Nullable) StringConvert(Nullable, Nullable) StringConvert(Nullable, Nullable) Returns character data converted from numeric data. StringConvert(Nullable, Nullable) StringConvert(Nullable, Nullable) StringConvert(Nullable, Nullable) Returns character data converted from numeric data. StringConvert(Nullable, Nullable, Nullable) StringConvert(Nullable, Nullable, Nullable) StringConvert(Nullable, Nullable, Nullable) Returns character data converted from numeric data. StringConvert(Nullable, Nullable, Nullable) StringConvert(Nullable, Nullable, Nullable) StringConvert(Nullable, Nullable, Nullable) Returns character data converted from numeric data. Stuff(String, Nullable, Nullable, String) Stuff(String, Nullable, Nullable, String) Stuff(String, Nullable, Nullable, String) Inserts a string into another string. It deletes a specified length of characters in the target string at the start position and then inserts the second string into the target string at the start position. Tan(Nullable) Tan(Nullable) Tan(Nullable) Returns the trigonometric tangent of the input expression. Tan(Nullable) Tan(Nullable) Tan(Nullable) Returns the trigonometric tangent of the input expression. Unicode(String) Unicode(String) Unicode(String) Returns the integer value, as defined by the Unicode standard, for the first character of the input expression. UserName() UserName() UserName() Returns a database user name corresponding to a specified identification number. UserName(Nullable) UserName(Nullable) UserName(Nullable) Returns a database user name corresponding to a specified identification number.