Archive for May, 2009

Chapter 4 QUERYING AND MODIFYING DATA 225 Sometimes

Sunday, May 24th, 2009

Chapter 4 QUERYING AND MODIFYING DATA 225 Sometimes data is entered into a database with leading or trailing spaces. To retrieve data free of these spaces, use the trim functions: LTRIM and RTRIM. SELECT RTRIM (LTRIM( this is an example ))+ TESTER As example Concatenation processes are often performed to generate names from a fully normalized database, as shown in Figure 4.5. You can change the direction of text or make an expression uppercase or lowercase by using these three functions: REVERSE, UPPER, and LOWER. Look at the following example: SELECT UPPER( mustafa ), LOWER( MUNAWAR ), REVERSE( Mustafa ) Concatenation of a string value to a NULL string results in NULL. A check should be performed for string content in situations where concatenated information could be partially or completely NULL. The SUBSTRING Function It may be that you want to return a part of a string rather than the whole string. The SUBSTRING function, which returns a part of a character or binary string, can be used for this. The syntax for SUBSTRING is SUBSTRING (expression, start, length) FIGURE 4.5 Concatenation to formulate names from multiple columns.

For high quality jboss hosting services please check jboss web hosting website.

224 Part I EXAM PREPARATION Character Functions SQL

Saturday, May 23rd, 2009

Chapter 4 QUERYING AND MODIFYING DATA 223 TABLE

Saturday, May 23rd, 2009

222 Part I EXAM PREPARATION tinyint). The precision

Friday, May 22nd, 2009

Chapter 4 QUERYING AND MODIFYING DATA 221 Where:

Thursday, May 21st, 2009

Chapter 4 QUERYING AND MODIFYING DATA 221 Where:

Thursday, May 21st, 2009

220 Part I EXAM PREPARATION DATEDIFF subtracts the

Wednesday, May 20th, 2009

Chapter 4 QUERYING AND MODIFYING DATA 219 TABLE

Tuesday, May 19th, 2009

218 Part I EXAM PREPARATION Be careful with

Tuesday, May 19th, 2009

Chapter 4 QUERYING AND MODIFYING DATA 217 REVIEW

Monday, May 18th, 2009