Microsoft SQL Server/Functions

min, max
The functions Min and Max respectively return the minimum and the maximum of one field list.

cast
Modify a variable type:

convert
Modify a variable type in first parameter, and its length in second.

Attention: all the variable types are not compatible between them.

Problem examples: Dates are not systematically recognized without. The solution is to store them in the  format: On the other hand, if an above paragraph date is stored in  with slashes, it becomes mandatory to reformat it to be able to compare.

Numerous date formats are available.

left, right, and substring
Allow to cut strings according to some of their characters positions.

For example with the slashes date case above:

replace and stuff
Search and replace: allow to replace some string characters according to their values.

For example, to update a given folder path :

isnull
Returns true the variable is null.

Date format
The function  is used to get the current date. To get another date in the good format, it's necessary to use :

Date cut
The function  extracts a date part without specifying manually its position.

However, three functions allow to accelerate these extractions writing:

Days addition and subtraction
Herewith two dates manipulation functions :
 * calculates the interval between two dates.
 * returns the date resulting from another plus an interval.

Example: gives: date 2014-12-31 23:59:59.000