Oracle XSQL- P12Welcome to the exciting world of eXtended Structured Query Language (XSQL) development! What’s so exciting? Efficiency and ease of use. XSQL isn’t some razzle-dazzle technology to wow your users. It also isn’t the latest X standard du jour that no one can stop talking about until you ask, “But what does it do for me today?” The problem with all of the great stuff out there is that no one technology does it all. | 200 Chapter 8 Chr The chr function returns the character associated with the number in the database s character set. If USING NCHAR_CS is specified it would use the database s national character set. SELECT chr 65 SIXTY_FIVE chr 65 USING NCHAR_CS SIXTY_FIVE_NATIONAL FROM DUAL Table lists the results. Table Chr Results SIXTY_FIVE SIXTY_FIVE_NATIONAL A A Concat The concat function is equivalent to the operator. It merges two strings. SELECT concat job concat - ename AS concat_str FROM emp WHERE deptno 10 Table lists the results. Table Concat Results CONCAT_STR MANAGER-CLARK PRESIDENT-KING CLERK-MILLER Greatest The greatest function returns the alphanumerically greatest string in its parameter list. Numbers and dates can be intermixed in the parameter list but dates use the default date mask. It s best to convert dates to strings first with the to_char function. SELECT greatest MAZE1 ename job dname MAZE2 AS greatest_str FROM emp dept WHERE AND 10 Oracle SQL 201 Table lists the results. Table Greatest Result GREATEST_STR MAZE2 PRESIDENT MILLER Initcap The initcap function capitalizes the first letter and lowercases all other letters. SELECT INITCAP mIXeD CaSE AS initcap_str FROM DUAL Table lists the results. Table Initcap Results INITCAP_STR Mixed case Instr The instr function which can be translated to mean in string searches the first string for the second string and returns the position. You can specify where to start searching in the string and which occurrence to find. SELECT instr tripper rip AS rip_pos instr tripper trip AS trip_pos instr tripper per AS rep_pos instr tripper xxx AS xxx_pos FROM dual Table lists the results. Table Instr Simple Results RIP_POS TRIP_POS REP_POS XXX_POS 2 1 5 0 202 Chapter 8 SELECT instr 00-11-00-11-00-11 00 2 AS start_1 instr 00-11-00-11-00-11 00 2 2 AS start_2_get_2 FROM dual Table lists the results. Table Instr Position and Instance .