<< < 1 2 3 4 5 6 7 8 9 10 11 > >>   ∑:464  Sort:Rank

CAST() - Converting Numeric Expression Data Types in SQL Server
How To Convert Numeric Expression Data Types using the CAST() Function in SQL Server Transact-SQL? If you want to convert the data type of a numeric expression to a new data type, you can use the CAST(expression AS data_type) function. The tutorial exercise below shows you how to use the CAST() func...
2017-03-27, 3133🔥, 0💬

CONVERT() - Converting Numeric Expression Data Types in SQL Server
How To Convert Numeric Expression Data Types using the CONVERT() Function in SQL Server Transact-SQL? If you want to convert the data type of a numeric expression to a new data type, you can use the CONVERT(data_type, expression) function. The tutorial exercise below shows you how to use the CONVERT...
2017-03-27, 3092🔥, 0💬

Converting Numeric Data Types by Assignment Operations in SQL Server
How To Convert Numeric Expression Data Types by Assignment Operations in SQL Server Transact-SQL? An assignment operation is used to assign an expression to a variable, a column, or a parameter. If the data type of the expression does not match the data type of the receiving variable, column, or par...
2017-03-27, 1501🔥, 0💬

Converting Numeric Expressions from One Data Type to Another in SQL Server
How To Convert a Numeric Expression from One Data Type to Another in SQL Server Transact-SQL? There are 4 ways to convert a numeric expression from one data type to another data type: Implicit conversion by arithmetic operations - When arithmetic operations are performed on expressions of different ...
2017-03-27, 1481🔥, 0💬

Arithmetic Operations with Different Data Types in SQL Server
What Happens to an Arithmetic Operation with Two Different Data Types in SQL Server Transact-SQL? When two expressions with different data types are put together for an arithmetic operation, the expression with a lower rank data type will be converted automatically to higher rank data type. Usually,...
2017-03-27, 1477🔥, 0💬

FLOOR, CEILING, ROUND - Converting Values to Integers in SQL Server
How To Convert Numeric Values to Integers in SQL Server Transact-SQL? Sometimes you need to round a numeric value into an integer. SQL Server 2005 offers you a number of ways to do this: FLOOR(value) - Returning the largest integer less than or equal to the input value. The returning data type is th...
2017-03-22, 4959🔥, 0💬

CONVERT() - Converting Character Strings to Numeric Values in SQL Server
How To Convert Character Strings into Numeric Values in SQL Server Transact-SQL? Sometimes you need to convert numeric values enclosed in character strings back to numeric values by using the CONVERT() function. When converting character strings to values with CONVERT(), you need to remember two rul...
2017-03-22, 3266🔥, 0💬

Overflow Errors on Converting Big Values to NUMERIC in SQL Server
What Happens When Converting Big Values to NUMERIC Data Types in SQL Server Transact-SQL? If you are converting a numeric expression to a NUMERIC data type and the value is too big for the storage size, you will get an arithmetic overflow error as shown in the following examples: -- Overflow error o...
2017-03-22, 1945🔥, 0💬

Mathematical Functions Supported by SQL Server 2005 in SQL Server
What Are the Mathematical Functions Supported by SQL Server 2005 in SQL Server Transact-SQL? SQL Server 2005 supports 23 mathematical functions: ABS, ACOS, ASIN, ATAN, ATN2, CEILING, COS, COT, DEGREES, EXP, FLOOR, LOG, LOG10, PI, POWER, RADIANS, RAND, ROUND, SIGN, SIN, SQRT, SQUARE, and TAN. The ret...
2017-03-22, 1500🔥, 0💬

Overflow Errors on Converting Big Values to Integers in SQL Server
What Happens When Converting Big Values to Integers in SQL Server Transact-SQL? If you are converting a numeric expression to an integer data type and the value is too big for integer storage size, you will get an arithmetic overflow error as shown in the following examples: -- Overflow error on imp...
2017-03-22, 1439🔥, 0💬

RAND() - Generating Random Numbers in SQL Server
How To Generate Random Numbers with the RAND() Function in SQL Server Transact-SQL? Random numbers are very useful for generating test data, passwords, or other security related data. SQL Server 2005 offers you the random number generator function RAND in two format: RAND(seed) - Starting a new sequ...
2017-03-11, 5886🔥, 0💬

ROUND() - Rounding Values to Specific Precisions in SQL Server
How To Round a Numeric Value To a Specific Precision in SQL Server Transact-SQL? Sometimes you need to round a numeric value to a specific precision. For example, you may want to round values in your financial statement to the precision of 1000.00. This can be done by the ROUND() function with the f...
2017-03-11, 5135🔥, 0💬

Character Strings and Binary Strings in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Character Strings and Binary Strings in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Character Strings and Binary Strings in SQL Server Transact-SQL. Clear answers ...
2017-03-11, 1898🔥, 0💬

String Type Conversion During Concatenation in SQL Server
What Happens When Unicode Strings Concatenate with Non-Unicode Strings in SQL Server Transact-SQL? If a Unicode string NVARCHAR is concatenated with a non-Unicode string VARCHAR, SQL Server will implicitly convert the non-Unicode string to Unicode string for concatenation. DECLARE @regcode VARCHAR(4...
2017-03-11, 1538🔥, 0💬

Concatenating Two Character Strings in SQL Server
How To Concatenate Two Character Strings Together in SQL Server Transact-SQL? Concatenating two character strings together is most commonly used string operation. SQL Server 2005 allows to concatenate two character strings into a single string with the (+) operator. The following tutorial exercise s...
2017-03-11, 1510🔥, 0💬

Converting Unicode Strings to Non-Unicode Strings in SQL Server
How To Convert a Unicode Strings to Non-Unicode Strings in SQL Server Transact-SQL? Since Unicode character set is different than code page based (non-Unicode) character set, converting Unicode strings to non-Unicode strings may result in wrong characters or missing characters. So you should avoid c...
2017-03-07, 3806🔥, 0💬

CHARINDEX() and SUBSTRING() - Locating and Taking Substrings in SQL Server
How To Locate and Take Substrings with CHARINDEX() and SUBSTRING() Functions in SQL Server Transact-SQL? Transact-SQL is not a language designed for manipulating strings, but it does have two simple functions to locate and take substrings: CHARINDEX() and SUBSTRING(). The tutorial exercise below ass...
2017-03-07, 3171🔥, 0💬

Character String Functions Supported by SQL Server 2005 in SQL Server
What Are the Character String Functions Supported by SQL Server 2005 in SQL Server Transact-SQL? SQL Server 2005 supports 23 character string functions: ASCII(char) - Returning the code value of a non-Unicode character. CHAR(int) - Returning the non-Unicode character of a code value. CHARINDEX(word,...
2017-03-07, 1514🔥, 0💬

Concatenating Two Binary Strings in SQL Server
How To Concatenate Two Binary Strings Together in SQL Server Transact-SQL? SQL Server 2005 allows to concatenate two binary strings into a single string with the (+) operator. The following tutorial exercise shows you some binary string concatenation examples: -- Concatenating two binary string lite...
2017-03-07, 1498🔥, 0💬

Converting Binary Strings into Integers in SQL Server
How To Convert Binary Strings into Integers in SQL Server Transact-SQL? Binary strings and integers are convertible implicitly and explicitly. But there several rules you need to remember: Binary strings will be implicitly converted into an integer data type, if it is involved in an arithmetical ope...
2017-02-28, 3918🔥, 0💬

Converting Binary Strings into NUMERIC or FLOAT in SQL Server
Can Binary Strings Be Converted into NUMERIC or FLOAT Data Types in SQL Server Transact-SQL? Can binary strings be converted into numeric or float data types? The answer is no. Binary strings can not be converted implicitly or explicitly into NUMERIC, DECIMAL, REAL, or FLOAT data types. The tutorial...
2017-02-28, 2639🔥, 0💬

Using Binary Strings in Arithmetical Operations in SQL Server
Can Binary Strings Be Used in Arithmetical Operations in SQL Server Transact-SQL? Can binary strings be used in arithmetical operations? The answer is yes. But there are two simple rules you need to remember: If an arithmetical operation has one binary string operand and one integer data type operan...
2017-02-28, 2566🔥, 0💬

Converting Binary Strings into Unicode Character Strings in SQL Server
Can Binary Strings Be Converted into Unicode Character Strings in SQL Server Transact-SQL? Can binary strings be converted into Unicode character strings? The answer is yes. But you need to know how Unicode characters are represented in a binary format. Remember the following simple rules: An ASCII ...
2017-02-28, 2407🔥, 0💬

Converting Binary Strings into Character Strings in SQL Server
Can Binary Strings Be Converted into Character Strings in SQL Server Transact-SQL? Binary strings and character strings are convertible. But there are several rules you need to remember: Binary strings can be converted implicitly to character strings by assignment operations. Binary strings can not ...
2017-02-28, 2086🔥, 0💬

<< < 1 2 3 4 5 6 7 8 9 10 11 > >>   ∑:464  Sort:Rank