Beginning Microsoft SQL Server 2008 ... - S3 Tech Training
Beginning Microsoft SQL Server 2008 ... - S3 Tech Training Beginning Microsoft SQL Server 2008 ... - S3 Tech Training
Appendix A: System Functions UNICODE The UNICODE function returns the Unicode number that represents the first character in character_ expression. The syntax is as follows: UPPER UNICODE(‘’) The UPPER function converts all the lowercase characters in character_expression into uppercase characters. The syntax is as follows: UPPER() System Functions 638 The system functions – the more longstanding way of referring to what Microsoft is now referring to simply as “other” – can be used to return information about values, objects and settings with SQL Server. The functions are as follows: ❑ APP_NAME ❑ CASE ❑ CAST and CONVERT ❑ COALESCE ❑ COLLATIONPROPERTY ❑ CURRENT_TIMESTAMP ❑ CURRENT_USER ❑ DATALENGTH ❑ FORMATMESSAGE ❑ GETANSINULL ❑ HOST_ID ❑ HOST_NAME ❑ IDENT_CURRENT ❑ IDENT_INCR ❑ IDENT_SEED ❑ IDENTITY ❑ ISDATE ❑ ISNULL ❑ ISNUMERIC
❑ NEWID ❑ NULLIF ❑ PARSENAME ❑ PERMISSIONS ❑ ROWCOUNT_BIG ❑ SCOPE_IDENTITY ❑ SERVERPROPERTY ❑ SESSION_USER ❑ SESSIONPROPERTY ❑ STATS_DATE ❑ SYSTEM_USER ❑ USER_NAME APP_NAME The APP_NAME function returns the application name for the current session if one has been set by the application as an nvarchar type. It has the following syntax: CASE APP_NAME() The CASE function evaluates a list of conditions and returns one of multiple possible results. It also has two formats: ❑ The simple CASE function compares an expression to a set of simple expressions to determine the result. ❑ The searched CASE function evaluates a set of Boolean expressions to determine the result. Both formats support an optional ELSE argument. Simple CASE function: CASE WHEN THEN ELSE END Searched CASE function: CASE WHEN THEN ELSE END Apendix A: System Functions 639
- Page 626 and 627: Appendix A: System Functions In add
- Page 628 and 629: Appendix A: System Functions @@TOTA
- Page 630 and 631: Appendix A: System Functions CHECKS
- Page 632 and 633: Appendix A: System Functions SUM Th
- Page 634 and 635: Appendix A: System Functions The de
- Page 636 and 637: Appendix A: System Functions @@REMS
- Page 638 and 639: Appendix A: System Functions Cert_I
- Page 640 and 641: Appendix A: System Functions Encryp
- Page 642 and 643: Appendix A: System Functions @@FETC
- Page 644 and 645: Appendix A: System Functions CURREN
- Page 646 and 647: Appendix A: System Functions SYSDAT
- Page 648 and 649: Appendix A: System Functions GetRoo
- Page 650 and 651: Appendix A: System Functions The ex
- Page 652 and 653: Appendix A: System Functions RAND T
- Page 654 and 655: Appendix A: System Functions ❑ IN
- Page 656 and 657: Appendix A: System Functions ❑ Is
- Page 658 and 659: Appendix A: System Functions FILEGR
- Page 660 and 661: Appendix A: System Functions INDEX_
- Page 662 and 663: IsCheckCnst IsConstraint IsDefault
- Page 664 and 665: Appendix A: System Functions OBJECT
- Page 666 and 667: Appendix A: System Functions TYPEPR
- Page 668 and 669: Appendix A: System Functions The qu
- Page 670 and 671: Appendix A: System Functions The SU
- Page 672 and 673: Appendix A: System Functions ASCII
- Page 674 and 675: Appendix A: System Functions The ch
- Page 678 and 679: Appendix A: System Functions CAST a
- Page 680 and 681: Appendix A: System Functions HOST_I
- Page 682 and 683: Appendix A: System Functions NULLIF
- Page 684 and 685: Appendix A: System Functions 646 Pr
- Page 686 and 687: Appendix A: System Functions Text a
- Page 688 and 689: Appendix B: Very Simple Connectivit
- Page 690 and 691: Appendix B: Very Simple Connectivit
- Page 692 and 693: Appendix B: Very Simple Connectivit
- Page 694 and 695: Appendix B: Very Simple Connectivit
- Page 696 and 697: ABS function A ABS function, 611 AC
- Page 698 and 699: closing tags closing tags, XML docu
- Page 700 and 701: cryptographic functions (continued)
- Page 702 and 703: defects defects. See well formed XM
- Page 704 and 705: EXPLICIT option EXPLICIT option bas
- Page 706 and 707: IGNORE_DUP_KEY option (CREATE INDEX
- Page 708 and 709: LOWER function LOWER function, 635
- Page 710 and 711: online transaction-processing (OLTP
- Page 712 and 713: query results query results alphabe
- Page 714 and 715: scripts (continued) creating with M
- Page 716 and 717: state state, basics of, 391 stateme
- Page 718 and 719: transactions (continued) COMMIT TRA
- Page 720: View Builder View Builder (Manageme
❑ NEWID<br />
❑ NULLIF<br />
❑ PARSENAME<br />
❑ PERMISSIONS<br />
❑ ROWCOUNT_BIG<br />
❑ SCOPE_IDENTITY<br />
❑ SERVERPROPERTY<br />
❑ SESSION_USER<br />
❑ SESSIONPROPERTY<br />
❑ STATS_DATE<br />
❑ SYSTEM_USER<br />
❑ USER_NAME<br />
APP_NAME<br />
The APP_NAME function returns the application name for the current session if one has been set by the<br />
application as an nvarchar type. It has the following syntax:<br />
CASE<br />
APP_NAME()<br />
The CASE function evaluates a list of conditions and returns one of multiple possible results. It also has<br />
two formats:<br />
❑ The simple CASE function compares an expression to a set of simple expressions to determine<br />
the result.<br />
❑ The searched CASE function evaluates a set of Boolean expressions to determine the result.<br />
Both formats support an optional ELSE argument.<br />
Simple CASE function:<br />
CASE <br />
WHEN THEN <br />
ELSE <br />
END<br />
Searched CASE function:<br />
CASE<br />
WHEN THEN <br />
ELSE <br />
END<br />
Apendix A: System Functions<br />
639