We’ve added the following new SQL Function to the InMemory.Net database. Wanted to thank Jônatas Hudler for the suggestion.
Substring(someString, startPos)
Ascii(someChar) – Returns the ASCII code for a given char – or the first char, in case of a char array (string)
Char(number) – Returns a char from an ASCII code
Reverse(someString) – Reverse character positions of the given string
Insert(baseString, startPos, strToInsert) – Insert strToInsert into baseString at startPos
CharIndex(someString, innerString) – Returns the position (1-based) of the first ocurrence of innerString in someString. If not found, return zero.
CharIndex(someString, innerString, seekStartPos) – Returns the position (1-based) of the first ocurrence of innerString (starting from seekStartPos position) in someString. If not found, return zero.
Remove(someString, startPos) – Removes all characters in someString from startPos on.
Remove(someString, startPos, length) – Removes characters in someString from startPos delimited by length.
Srqt(number) – Returns the square root for the given number.
[Sin | Cos | Tan | Sinh | Cosh | Tanh | Asin | ACos | ATan | ATan2] (number) – Returns, respectively, the Sine, Cosine, Tangent (+ respective Hyperbolic versions and others…) of a number representing an angle in radians.
Rand() – Returns a random double that will vary from 0 to 1. Rand() is used as an alias for Random()
Log(number) – Returns the natural logarithm of a number
Log(number, base) – Returns the logarithm of a number for the given base.
Pow(number, power) – Returns number raised to power.
[Max | Min] (number1, number2) – Returns, respectively, the greater or the lowest number.
Round(number, decimalPlaces) – Rounds a given number to the decimalPlaces limit.
IsNullOrEmpty(aField) – Returns True (1) if a field is null. If this field is a string, also returns true if its length is zero. Else returns False (0). Only works with Strings atm.
StartsWith(string, substring) – Returns True if a string starts with substring.
EndsWith(string, substring) – Returns True if a string ends with substring.
DateDiffMillisecond(endDate, startDate) – Date Diff returning elapsed milliseconds
DateDiffTick(endDate, startDate) – Date Diff returning elapsed ticks
MinList ( param1,param2,param ,.. paramN ) returns the minimum of list of params param1 through paramN