Microsoft® SQL Server® 2012 Bible
187 Chapter 8: Data Types, Expressions, and Scalar Functions 8 The IS operator may be combined with NOT to test for the presence ...
188 Part II: Building Databases and Working with Data CASE WHEN expression1 IS NOT NULL THEN expression1 WHEN expression2 IS NOT ...
189 Chapter 8: Data Types, Expressions, and Scalar Functions 8 Functionally, ISNULL() is similar to the following case expressio ...
190 Part II: Building Databases and Working with Data The following code converts any blanks in the MiddleName column into nulls ...
191 Chapter 8: Data Types, Expressions, and Scalar Functions 8 Best Practice Performance is as much a part of the data-schema de ...
192 Part II: Building Databases and Working with Data T-SQL includes several functions to return the current date and time: ■ Ge ...
193 Chapter 8: Data Types, Expressions, and Scalar Functions 8 day dd, d week wk, ww weekday dw hour hh minute mi, n second ss, ...
194 Part II: Building Databases and Working with Data FROM Sales.SalesOrderHeader Result: OrderDate Year Month Day OrderDay ---- ...
195 Chapter 8: Data Types, Expressions, and Scalar Functions 8 SELECT DATEDIFF(yy,'6/28/1997', CURRENT_TIMESTAMP) AS MarriedYear ...
196 Part II: Building Databases and Working with Data New SQL 2012 Functions This section discusses functions new to SQL Server ...
197 Chapter 8: Data Types, Expressions, and Scalar Functions 8 Using the offset values, you can represent time zone offsets. How ...
198 Part II: Building Databases and Working with Data SELECT SUBSTRING('abcdefg', 3, 2); Result: cd STUFF (string, insertion pos ...
199 Chapter 8: Data Types, Expressions, and Scalar Functions 8 RIGHT (string, count) and LEFT (string, count) RIGHT and LEFT Ret ...
200 Part II: Building Databases and Working with Data REPLACE (string, string) The Replace() function operates as a global searc ...
201 Chapter 8: Data Types, Expressions, and Scalar Functions 8 Name -------------------------------------------------- Chain Sta ...
202 Part II: Building Databases and Working with Data SET @CurrentWord = UPPER(SUBSTRING(@StrIn, @CurrentPosition, 1)); SET @Cu ...
203 Chapter 8: Data Types, Expressions, and Scalar Functions 8 Results ---------------------------- Patrick 1 LeBlanc The FORMAT ...
204 Part II: Building Databases and Working with Data Here’s how Soundex works. The fi rst letter of a name is stored as the let ...
205 Chapter 8: Data Types, Expressions, and Scalar Functions 8 Result: LeBlanc LaBlanc LeBlank -------- ------- -------- L145 L1 ...
206 Part II: Building Databases and Working with Data matching rows, because the stored Soundex code is extremely fast. You can ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf