Rocket UniData. SQL Commands Reference Guide. Version December 2015 UDT-811-SQLR-1

Size: px
Start display at page:

Download "Rocket UniData. SQL Commands Reference Guide. Version December 2015 UDT-811-SQLR-1"

Transcription

1 Rocket UniData SQL Commands Reference Guide Version December 2015 UDT-811-SQLR-1

2 Notices Edition Publication date: December 2015 Book number: UDT-811-SQLR-1 Product version: Version Copyright Rocket Software, Inc. or its affiliates All Rights Reserved. Trademarks Rocket is a registered trademark of Rocket Software, Inc. For a list of Rocket registered trademarks go to: All other products or services mentioned in this document may be covered by the trademarks, service marks, or product names of their respective owners. Examples This information might contain examples of data and reports. The examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. License agreement This software and the associated documentation are proprietary and confidential to Rocket Software, Inc. or its affiliates, are furnished under license, and may be used and copied only in accordance with the terms of such license. Note: This product may contain encryption technology. Many countries prohibit or restrict the use, import, or export of encryption technologies, and current use, import, and export regulations should be followed when exporting this product. 2

3 Corporate information Rocket Software, Inc. develops enterprise infrastructure products in four key areas: storage, networks, and compliance; database servers and tools; business information and analytics; and application development, integration, and modernization. Website: Rocket Global Headquarters 77 4th Avenue, Suite 100 Waltham, MA USA To contact Rocket Software by telephone for any reason, including obtaining pre-sales information and technical support, use one of the following telephone numbers. Country Toll-free telephone number United States Australia Belgium Canada China France Germany Italy Japan Netherlands New Zealand South Africa United Kingdom Contacting Technical Support The Rocket Customer Portal is the primary method of obtaining support. If you have current support and maintenance agreements with Rocket Software, you can access the Rocket Customer Portal and report a problem, download an update, or find answers to in the U2 Knowledgebase. To log in to the Rocket Customer Portal or to request a Rocket Customer Portal account, go to In addition to using the Rocket Customer Portal to obtain support, you can send an to u2support@rocketsoftware.com or use one of the following telephone numbers. Country Telephone number North America United Kingdom/France +44 (0) or +44 (0) Europe/Africa +44 (0) Australia or +61 (0) New Zealand

4 Contents Notices... 2 Corporate information... 3 Chapter 1: UniData SQL commands...6 Elements of syntax statements... 6 Elements of UniData SQL commands summary... 6 Data Definition Language (DDL)... 6 Data Control Language (DCL)... 7 Data Manipulation Language (DML)...7 Report commands (RPT)...7 Supplementary commands (SUP)... 8 Select statement elements... 8 UniData SQL limitations...9 ALTER TABLE... 9 ALTER TABLE ADD...10 ALTER TABLE MODIFY...10 Modifying association names Example: ALTER TABLE MODIFY ALTER TABLE DELETE ALTER TABLE MODULO...12 AUTO COMMIT...13 BREAK BTITLE...15 CLEAR...19 COLUMN...20 COMMIT...23 COMO COMPUTE...25 CREATE INDEX CREATE SUBTABLE CREATE TABLE...33 Assigning modulo CREATE VIEW DELETE...40 DROP INDEX DROP SUBTABLE...42 DROP TABLE DROP VIEW EXIT GRANT INSERT LISTDICT LOCK TABLE QUIT REVOKE ROLLBACK...51 SELECT UNNEST options Guide to unnesting select_stmt parameters Simple statement examples Unnesting

5 Contents SET SHOW SQL TTITLE UPDATE...76 Adding multivalues and multi-subvalues Null value handling Examples Appendix A: Defining attributes...81 Default format and conversion codes...81 Attribute name...81 Data type CHAR DATE...83 NUMBER...83 LONG Conversion codes...84 Virtual attributes (IDESC or VIRTUAL) Location (LOC) Display name (DISP) FORMAT Value code specification Associating attributes...87 Appendix B: Unnesting attributes Unnesting associated attributes...88 Sample table for unnesting examples Unnesting associated multivalued attributes Unnesting associated multi-subvalued attributes Unnesting all attributes in an association...91 Unnesting unassociated attributes Appendix C: Creating subtables...94 Base tables T_CLIENTS T_INVENTORY T_ORDERS CREATE SUBTABLE examples Appendix D: Arithmetic functions and operators Arithmetic functions Arithmetic operators

6 Chapter 1: UniData SQL commands This chapter provides complete descriptions of all commands in the Rocket UniData implementation of Structured Query Language (SQL). UniData SQL commands can be entered from the sql prompt or by encoding a series of SQL statements in an ASCII text file (UniData SQL script) with your system editor. You can then execute the script from the operating system prompt. This provides the capability of reusing a series of UniData SQL statements. Elements of syntax statements This reference manual uses a common method for stating syntax for UniData commands. The syntax statement includes the command name, required arguments, and options that you can use with the command. Italics represents a variable that you can replace with any valid option. The following figure illustrates the elements of a syntax statement. Elements of UniData SQL commands summary Data Definition Language (DDL) Data definition language is also called schema definition. It uses table, indexing, view, and subtable commands. Table commands 6 CREATE TABLE ALTER TABLE DROP TABLE

7 Data Control Language (DCL) Indexing commands CREATE INDEX DROP INDEX View commands CREATE VIEW DROP VIEW Subtable commands CREATE SUBTABLE DROP SUBTABLE Data Control Language (DCL) Data control language is also called connection management. It uses privilege and transaction processing commands. Privilege commands GRANT REVOKE Transaction processing commands AUTO COMMIT COMMIT ROLLBACK LOCK TABLE SET DISPLAY SET TRANSACTION Data Manipulation Language (DML) INSERT SELECT, on page 52 UPDATE DELETE Report commands (RPT) TTITLE BTITLE 7

8 Chapter 1: UniData SQL commands COLUMN COMPUTE BREAK CLEAR SET SHOW Supplementary commands (SUP) SQL EXIT QUIT LISTDICT COMO Select statement elements 8

9 UniData SQL limitations UniData SQL limitations In a SELECT statement, you cannot select more than 1000 attributes. All identifiers in UniData SQL, such as table_name, view_name, attribute_name, table_label, and all variables in OLD/NEW_VALUE of the COLUMN statement can be no longer than 30 characters. A UniData SQL statement cannot exceed 49 lines. The length of a single line of a UniData SQL statement, when used interactively, cannot exceed 272 characters. A single association cannot exceed 64 attributes. A table can contain a maximum of 12 associations. SELECT statement or clause cannot contain more than 255 virtual attributes. The IN predicate cannot contain more than five operators. Each operator must be a constant. The length of each constant cannot exceed 95 characters. Within a WHERE clause, the total number of predicates and Boolean operators cannot exceed 255. The ORDER BY clause can contain no more than nine elements (attribute names, expressions, and ordinal positions). The number of tables in the FROM clause of a SELECT statement is limited to 16. However, when performing a join, a new temporary table is created internally for every two joined tables in the FROM clause. Therefore, a join can contain no more than eight join tables, whereas a nested subquery with exactly one table at every level may contain up to 16 levels. The UNNEST clause can process 10,240 values in a multivalued or multi-subvalued attribute, or in all associations for the unnested record. The number of elements (column names, expressions, and functions) in a select list cannot exceed ALTER TABLE Use the ALTER TABLE command to add, modify, or delete attribute definitions in a table or to change the modulo for a table. You cannot modify subtables with ALTER TABLE; you must delete and re-create them. Syntax ALTER TABLE table_name {ADD MODIFY DELETE} (attribute_definition [,attribute_definition...]) ALTER TABLE table_name MODULOm[,n] Note: attribute_definition syntax is fully described in Defining attributes, on page 81. When you use ALTER TABLE to modify or delete attribute_location, UniData SQL changes the dictionary entry for the attribute, which may make one or more attributes inaccessible (changing attribute location, for example). If you later add back the attribute at the same location, the data again becomes accessible. You must update/reindex if you modify an indexed attribute. Keywords The following table describes keywords you can use with ALTER TABLE. 9

10 Chapter 1: UniData SQL commands Keyword Description ADD Add an attribute definition to a table. MODIFY Change the definition of an attribute in a table. DELETE Delete an attribute definition from a table. MODULO Change the modulo size/block size of a table. Controls the size of the table by assigning block size and number of blocks to store the data. The parameters for ALTER TABLE are described under CREATE TABLE. Exceptions and additions to these descriptions are noted in the following sections. ALTER TABLE ADD The ADD keyword creates a new attribute definition or alias. If no location is specified, the new attribute is assigned the next available location. Syntax ALTER TABLE table_name ADD (attribute_definition[, attribute_definition]...) Parameters table_name is the name of the table to be modified. For a description of attribute_definition, see Defining attributes, on page 81. Example sql> ALTER TABLE ORDERS ADD sql> (CATEGORY CHAR(10)); 1 attribute(s) added. ALTER TABLE MODIFY The MODIFY keyword modifies only the characteristics of the attribute you specify; other characteristics of the attribute remain the same. Note that UniData may update associations affected by the changes you make. The attribute you specify in the MODIFY clause must already exist in the dictionary; if it does not, UniData SQL displays an error message. You can modify any characteristic of an attribute definition except the location of attribute. Syntax ALTER TABLE table_name MODIFY (attribute_definition[,attribute_definition]...) table_name is the name of the table to be modified. For a description of attribute_definition, see Defining attributes, on page 81. Data type in attribute_definition is optional for ALTER TABLE MODIFY. 10

11 Modifying association names Parameters For a description of table_name, see CREATE TABLE, on page 33. For a description of attribute_definition, see Defining attributes, on page 81. Example The following example demonstrates modifying the ORDERS table by adding a display name for the CLIENT_NO attribute: sql> ALTER TABLE ORDERS MODIFY sql> (CLIENT_NO DISP("Client No.")); 1 attribute(s) modified. Modifying association names When you modify the association name of an attribute, UniData SQL makes corresponding changes to the PH attribute. If you add a new association name to an attribute definition, UniData SQL creates a phrase attribute for that name and puts the related attribute name into the phrase of the PH attribute. If you add an existing association name to an attribute definition, UniData SQL adds the attribute name to the phrase of the PH attribute. If you remove the association name from an attribute definition, UniData SQL deletes that attribute name from the phrase of the associated PH attribute. If you remove the association name and it is not used in any other attribute definitions, UniData SQL deletes the association attribute (PH) from the dictionary. Example: ALTER TABLE MODIFY The following example demonstrates modifying the ORDERS table by adding a display name for the CLIENT_NO attribute: sql> ALTER TABLE ORDERS MODIFY sql> (CLIENT_NO DISP("Client No.")); 1 attribute(s) modified. ALTER TABLE DELETE The DELETE keyword deletes an attribute definition or alias. You cannot delete of the table unless it has at least one alias. Syntax ALTER TABLEtable_ spec DELETE (attribute_name[,attribute_name]...) ALTER TABLE DELETE deletes the attribute definition, making the data inaccessible. If you later add an attribute at the same location, the data again becomes accessible. table_name is the name of the table to be modified. For a description of attribute_definition, see Defining attributes, on page

12 Chapter 1: UniData SQL commands Examples This example demonstrates deleting PRICE from the ORDERS table: sql> ALTER TABLE ORDERS DELETE (PRICE); 1 attribute(s) deleted. In the following example, is deleted from the ORDERS table, making the data in that attribute inaccessible. Notice that can be deleted because an alias exists in the ORDERS file for this attribute; the data are still accessible through this alias. sql> ALTER TABLE ORDERS DELETE (@ID); 1 attribute(s) deleted. sql> FROM is not a field name. Transaction aborted. Then, when is added back at the same location, the data is again accessible through that attribute name. sql> ALTER TABLE ORDERS ADD (@ID NUMBER LOC(0)); 1 attribute(s) added. sql> FROM ORDERS; Page ALTER TABLE MODULO The MODULO keyword resizes a static table. Disk space is reallocated based on the new MODULO. Assigning a new modulo physically rebuilds the file. Syntax ALTER TABLE table_name MODULO m[,n] Parameters table_name is the name of the table to be modified. For instructions on setting MODULO, see CREATE TABLE, on page 33. Example sql> ALTER TABLE CLIENTS MODULO 23; CLIENTS RESIZED from 19 to 23 12

13 AUTO COMMIT AUTO COMMIT AUTO COMMIT ON causes each statement to commit immediately. AUTO COMMIT gives application developers and users enhanced transaction control capabilities. Syntax AUTO COMMIT [ ON OFF ] Parameters The following table describes each parameter of the syntax. Parameter Description ON Each UniData SQL statement is immediately committed, releasing all locks. OFF Several statements can be combined into one transaction. Use the OFF parameter if you want to be able to commit or roll back a set of statements as a single unit. no option Displays the current setting of AUTO COMMIT. Note: Unlike SET, TRANSACTION, which sets options that apply to the next trans action only, AUTO COMMIT affects all subsequent transactions until UniData SQL encounters another AUTO COMMIT statement. Example The following example demonstrates the use of AUTO COMMIT to display or change its status: sql> AUTO COMMIT; Transaction auto commit option is ON. sql> AUTO COMMIT OFF; sql> AUTO COMMIT; Transaction auto commit option is OFF. BREAK The BREAK command activates actions established by the COLUMN and COMPUTE commands, and adds printer directives to take place at the break. Syntax BREAK ON {[attribute_name ["text" VALUE] [NODUP DUPL] expression["text" VALUE] [NODUP DUPL] ] ROW [BSKIP n] [SKIP n [SKIP] PAGE] REPORT [BSKIP n] [SKIP n [SKIP] PAGE] }... Both BREAK and COMPUTE must specify the same "ON" level, such as "ON REPORT" or "ON fld1." A break may be associated with any of the following: A change in value of a specified attribute 13

14 Chapter 1: UniData SQL commands The end of a record The end of a report BREAK actions include the following: Skip a number of lines Execute a page break Print out messages Note: Only one break command can be in effect at one time. The last break command overrides the preceding one. Parameters The following table describes each parameter of the syntax. Parameter Description ON Breaks when the value of the attribute or expression changes. attribute_name An attribute name on which to execute break commands. expression Any combination of attribute names, constants, arithmetic operators, and UniData SQL functions that together select data. Expressions must be enclosed in quotation marks, and keywords must be entered in uppercase. text Displays text at break. text must be enclosed in quotation marks. VALUE Displays the value of attribute_name or expression. NODUP Default. Prints only unique values. DUPL Prints duplicate values. ROW Breaks after every record. REPORT Breaks at the end of the report. BSKIP n Skips n lines before printing the break line. SKIP n Skips n lines after printing the break line. SKIP PAGE Skips to a new page after printing the break line. The keyword SKIP is optional. no parameter Displays the current break definition. Example The following example demonstrates the BREAK ON command, used to separate report information into a readable format. The break is set on PROD_NAME. Notice that the rows are also ordered by PROD_NAME so that all products of the same name are listed together. 14

15 BTITLE BTITLE The BTITLE command establishes a footer for printed and displayed reports created by SELECT statements. You can specify any number of constants and variables. These parameters are executed in the order in which they are defined. You can apply any number of BTITLE options to one or more attributes. If more than one BTITLE command is applied to the same attribute, the last command supersedes all previous commands. Syntax BTITLE [ print_clause OFF ON] print_clause syntax: {COL [n] LEFT CENTER RIGHT} [ text ] [FORMAT format [TAB [n] ] old_val text ]... Note: Execute the SHOW BTITLE command to display the current setting of BTITLE. Parameters The following table describes each parameter of the syntax. Parameter Description print_clause Sets the following: Skip columns. Skip lines. Align title data left, center or right. Format "text" for display. For print_clause options, see the next table. ON Turns the footer on, causing "text" to be printed. OFF Turns the footer off. You do not have to redefine "text" to turn footers back on. 15

16 Chapter 1: UniData SQL commands Parameter Description no parameter Displays BTITLE current settings. SHOW BTITLE also displays current settings. print_clause parameters The following table describes each parameter of print_clause. Clause Description COL n Skips to the nth column before displaying the header. The first column is numbered 0. SKIP n Skips n lines before printing out the text. The default is 1. LEFT, CENTER, RIGHT Aligns the title data on the current line. The data item (variable or text) is aligned as a group to the end of the statement, or to the next LEFT, CENTER, or RIGHT, or to the next COL, SKIP, or TAB. CENTER and RIGHT are calculated based on the LINESIZE option of the SET statement. FORMAT format Specifies a format model for the following data item. FORMAT is effective until the end of the statement or until another FORMAT clause is encountered in the same statement. format options are discussed following this table. old_val Displays the current value of the variable old_val, set by OLD_VALUE in the previously executed COLUMN statement. "text" Displays a two-line footer. The first line contains the date at the left and the page number on the right; the second line contains the center-aligned text. You can include any number of the following heading options enclosed in single quotation marks: C[n] Centers heading or footing text within a line of n width. D Inserts the current system date. L Inserts a blank line. N Suppresses the default prompt, Enter new line to continue..., that appears at the bottom of each screen page. Pages scroll without stopping until the report is finished. (The prompt displays only in interactive mode.) P or S Inserts the current page number. T Inserts the time and date when report generation began. TAB n Skips n columns from the current position. format options format specifies the display format for values in the footer. format must be enclosed in quotation marks, and can be one of the following: 16 Character Format Options The format for a character string is An where n is the column width. The default is the length specified in the dictionary definition of the attribute. Date Format Options You may not specify format options for date attributes; the formatting specified in the dictionary definition of the attribute is used. Numeric Format Options Use the options in the following table to build a display mask for formatting numeric values. Option Explanation Example 9 Determines number of digits displayed Display leading zeros. 0999

17 BTITLE Option Explanation Example $ Prefix displayed value with a dollar sign. $9999 B Print leading zeros as blank. B999 MI Display minus sign (-) after a negative value. 9999MI PR Display a negative value in angle brackets 9999PR. Align on the decimal point , Insert a comma every three digits. 99,999 V Multiply the value by the n power 999V99 of 10, where n is the number of 9s after V. EEEE Display the scientific notation (the format must contain four Es). 9.99EEEE Examples The following example demonstrates using the BTITLE command to learn its status. The preceding COLUMN command establishes the variable old_val, which is displayed in the BTITLE setting. sql> COLUMN PROD_NAME OLD_VALUE old_val; sql> BTITLE SKIP 2 COL 0 "Product:" TAB 15 old_val; sql> BTITLE ON; sql> BTITLE; Btitle is ON Btitle skip 2 col 0 'Product:' tab 15oldvalOption The next example demonstrates creating a header and footer, then displaying them by executing a SELECT statement. The SET PAGESIZE command causes the display page to be 10 lines long; SET LINESIZE establishes a 40-character-wide display area. sql> sql> sql> sql> sql> sql> sql> SET PAGESIZE 10; SET LINESIZE 40; TTITLE "Page TOP Title"; BTITLE "Page BOTTOM Title"; TTITLE ON; BTITLE ON; SELECT ID FROM ORDERS; The following is output from the preceding commands: 17

18 Chapter 1: UniData SQL commands The next example demonstrates the following: SET LINESIZE to set the report width to 40 characters COLUMN...NEW_VALUE...OLD_VALUE to save the current and old value of PROD_NAME (from the INVENTORY table) TTITLE settings: SKIP 2 to skip two lines before displaying the report title (Product Prices) CENTER to center the report title (Product Prices) SKIP 2 to skip two lines before displaying the next title line (Product) TAB 2 to skip two spaces before printing the new value of PROD_NAME ON to turn the header on BTITLE settings: SKIP 2 to skip two lines before displaying the report footer (Product). COL 0 to skip 0 spaces (left-justify) the footer (Product). TAB 2 to skip two spaces before displaying the old value of PROD_NAME. ON to turn the footer on. sql>set LINESIZE 40; sql>column PROD_NAME sql>new_value newval sql>old_value oldval; sql>ttitle SKIP 2 sql>center "Product Prices" SKIP 2 sql>"product:" TAB 2 newval; sql>ttitle ON; sql>btitle SKIP 2 COL 0 "Product:" TAB 2 oldval; sql>btitle ON; The following SELECT statement displays output formatted by the above commands. Notice that the first header does not display a product name after Product: because the variable old_val has not yet been assigned a value. 18

19 CLEAR For more examples, see TTITLE, on page 72. CLEAR The CLEAR command erases the current definition for the specified option. Syntax CLEAR {BREAK COLUMN COMPUTE} Parameters The following table describes each parameter of the syntax. Parameter Description BREAK Clears the break definition specified by the BREAK command. COLUMN Clears column definitions defined by the COLUMN command. COMPUTE Clears computation definitions set by COMPUTE commands. Example sql> CLEAR COMPUTE; 19

20 Chapter 1: UniData SQL commands computes cleared sql> CLEAR BREAK; breaks cleared COLUMN The COLUMN command associates display formats for column headings with specified attributes. If more than one COLUMN command is applied to the same attribute, the last overrides all previous settings. Syntax COLUMN {attribute_name expression} [ALIAS alias] [CLEAR DEFAULT] [FORMAT column_format] [HEADING "text" [JUSTIFY {LEFT CENTER RIGHT}]] [LIKE {expression attribute_label}] [NEWLINE] [NEW_VALUE new_val] [OLD_VALUE old_val] [NOPRINT PRINT] [NULL "text"] [ON OFF] [SPACE n] [WRAPPED WORD_WRAPPED TRUNCATED] Tip: The COLUMN command formats all displayed attributes of the same name in all tables. When selecting columns of the same name from multiple tables, avoid confusion by assigning an attribute label to at least one of them in the SELECT statement that uses the COLUMN setting. Parameters The following table describes each parameter of the syntax. 20 Parameter Description attribute_name Specifies the attribute to format. expression Any combination of attribute names, constants, arithmetic operators, and UniData SQL functions that together select attributes to be associated with display formats. Expressions that contain spaces must be enclosed in quotation marks. expression must be defined the same way as in the SELECT statement. Keywords must be entered uppercase even if they were lowercase in the SELECT statement. ALIAS alias Assigns an alias to expression or attribute_spec. You may use this alias in expression or attribute_spec anywhere in the statement; however, alias must be defined for each statement. CLEAR Removes the column definition for expression or attribute_spec. DEFAULT Resets the column definition to default settings, including PRINT ON and WRAP ON. FORMAT column_format Formats values displayed in this column. For information on these options, see the next section.

21 COLUMN Parameter Description HEADING "text" Assigns a column heading. The default column heading is the attribute name or the expression itself. Enclose text within quotation marks if it contains spaces or special characters. If the text contains HEADSEP, the column heading is displayed over multiple lines. JUSTIFY Aligns the column heading. HEADING must be specified to use JUSTIFY. LEFT Left-align column heading. CENTER Center column heading. RIGHT Align column heading at right column margin. LIKE expression LIKE attribute_label Copies the COLUMN specification of another column, or as defined in expression. LIKE attribute_label copies the display name of an attribute. NEWLINE With SET WRAP HORI, starts a new line before displaying the value of a column. With SET WRAP DEF, switches to vertical format. NEW_VALUE new_val Saves the current value of an attribute for use in TTITLE statements to print a header that reflects current attribute values. NOPRINT PRINT Turns on or off printing column text. The default is PRINT. NULL "text" With null value handling on, the text variable specifies text to be displayed for the null value. This text overrides the default text specified in the NULL clause of the SET command, if any. If you do not specify text for the null value in either the COLUMN command or the SET command, the null value is represented by an empty string. With null value handling off, this keyword has no effect. OFF ON Turns COLUMN settings off or on without affecting the settings. The default is ON. OLD_VALUE old_val Saves the current value of an attribute for use in BTITLE statements to print a footer that reflects current attribute values. SPACE n Places the next column n spaces to the right of the current position. Defaults to the position established by the SET command (SET SPACE n). WRAPPED WORD_WRAPPED TRUNCATED Specifies wrapping or truncating of column text when text is wider than the column. WRAPPED wraps text to the next line; default. WORD_WRAPPED wraps text without breaking words. TRUNCATED deletes text that does not fit in the column. no option Displays current column definitions. column_format options column_format specifies the display format for values in the column. column_format must be enclosed in quotation marks, and can be one of the following: Character Format Options The format for a character string is An where n is the column width. The default is the length specified in the dictionary definition of the attribute. Date Format Options You cannot specify format options for date attributes; the formatting specified in the dictionary definition of the attribute is used. Numeric Format Options Use the options in the following table to build a display mask for formatting numeric values. 21

22 Chapter 1: UniData SQL commands Option Explanation Example of mask 9 Represents one numeric display position Display leading zeros $ Prefix a dollar sign before the displayed value. $9999 B Print leading zeros as blank. B999 MI Display minus sign (-) after a negative value. 9999MI PR Display a negative value in angle brackets 9999PR. Align on the decimal point , Insert a comma where placed in the mask. 99,999 V Multiply the value by the n power of 10, where n is the number of 9s after V. 999V99 EEEE Display the scientific notation 9.99EEEE (the format must contain four Es). Examples The following COLUMN statement skips a line after ORD_TIME is displayed, and presents the data in vertical format: sql> COLUMN ORD_TIME NEWLINE; The following output is produced when you select ORD_TIME after executing the above COLUMN command: sql> SELECT ORD_DATE, ORD_TIME FROM ORDERS; Page 1 Order Date 01/13/1996 Order Time 12:30PM Order Date 09/28/1995 Order Time 04:34PM Order Date 01/14/1996 Order Time 03:00PM... Enter <New line> to continue...q Next, we clear the COLUMN setting and execute the same SELECT statement: sql> CLEAR COLUMN; columns cleared sql> SELECT ORD_DATE, ORD_TIME FROM ORDERS; The same attributes are displayed as in the preceding example, but no lines are skipped: Page 1 Order Order Date Time /13/ :30PM 22

23 COMMIT 09/28/ /14/ /05/ /24/ /15/ /04/ /24/ /13/ Enter <New 04:34PM 03:00PM 11:11AM 03:09PM 10:00AM 09:45AM 03:27PM 12:51PM line> to continue...q COMMIT The UniData SQL COMMIT command concludes an active transaction. The optional keyword WORK is provided for backward compatibility. If a COMMIT command executes without an active transaction, UniData SQL displays the following error message: Invalid transaction termination: no active transaction. The system performs the following steps during a transaction commit: Disables the break key. Writes all updates. Releases all locks acquired within the transaction. Enables the break key. If the transaction cannot commit, the system performs the following steps: Aborts the transaction. Releases all locks acquired within the transaction. Syntax COMMIT [WORK] UniBasic STATUS function return values The UniBasic STATUS function returns the values in the following table if executed immediately after the UniData SQL COMMIT command. Value Description 0 The commit completed successfully. 1 Transaction not started. 3 Transaction cannot commit. COMO The COMO command saves the history of a user session. When you open a COMO file, UniData SQL stores all terminal input and output in the UniData SQL DIR-type table, _PH_, in the file O_filename (O_filename is a UNIX sequential file). To specify a COMO file name that is not SQL compliant, enclose the file name in quotation marks, as shown in the following statement: COMO ON file.name. 23

24 Chapter 1: UniData SQL commands Tip: COMO files grow very quickly. We recommend that you periodically review and delete unused COMO files. Syntax COMO option filename option values The following options are valid for use with COMO. Option Description ON Opens a new COMO output file. If filename exists, contents are overwritten. OFF Closes the COMO file and stops capturing terminal display. SPOOL Sends a copy of a selected COMO file to the printer. DELETE Deletes the specified COMO file from the _PH_ table. LIST Lists all the COMO files in the _PH_ table. APPEND Appends terminal display to an existing COMO file. Examples Note: The following examples show the COMO file name as it appears in UniData for UNIX. If you are using UniData for Windows Platforms, you would see the full path for the COMO file (such as D: \UniData73\demo\_PH_\O_SAVESQL). The following example demonstrates creating a COMO file, executing a command, and closing the COMO file: sql> COMO ON SAVESQL; /usr/ud73/_ph_/o_savesql established sql> SELECT * FROM INVENTORY; Page 1 INVENTORY Inventory Date 01/09/1996 Inventory Time 08:00AM Product Name Photocopier Features Personal Photocopier Color Quanti Price Reorde Beige 785 $ INVENTORY Inventory Date 01/11/1996 Inventory Time 12:00PM Product Name Trackball Features Super Deluxe Model Color Quanti Price Reorde Gray 494 $ INVENTORY Inventory Date 12/15/1995 Inventory Time 05:34PM Product Name Scanner Enter <New line> to continue...q sql> COMO OFF SAVESQL; 24

25 COMPUTE _PH_/O_SAVESQL closed The next example shows the contents of the COMO file SAVESQL. /usr/ud73/_ph_/o_savesql established sql> SELECT * FROM INVENTORY; Page 1 INVENTORY Inventory Date 01/09/1996 Inventory Time 08:00AM Product Name Photocopier Features Personal Photocopier Color Quanti Price Reorde Beige 785 $ INVENTORY Inventory Date 01/11/1996 Inventory Time 12:00PM Product Name Trackball Features Super Deluxe Model Color Quanti Price Reorde Gray 494 $ INVENTORY Inventory Date 12/15/1995 Inventory Time 05:34PM Product Name Scanner Enter <New line> to continue...q sql> COMO OFF SAVESQL; COMPUTE The COMPUTE command performs computations on groups of data selected by a SELECT statement. You may apply multiple COMPUTE commands to the same column. To activate options set with COMPUTE, you must subsequently execute the BREAK command and specify the same ON condition as in the COMPUTE statement. You must also display the BREAK attribute for COMPUTE to take effect. When the break (change in data value) occurs, UniData SQL performs the calculations specified by the COMPUTE statement. Tip: Use ORDER BY in the SELECT statement that uses the COMPUTE settings to order the rows in the correct sequence. Syntax COMPUTE {AVG COUNT MAX MIN NUMBER STD SUM VARIANCE...} OF {expression attribute_name}... ON {expression attribute_ name REPORT ROW...} Parameters The following table describes each parameter of the syntax. Parameter Description AVG Computes the average value. Valid for numeric data. 25

26 Chapter 1: UniData SQL commands Parameter Description COUNT Counts the number of values in a row. Valid for all data types. UniData SQL does not count the null value. MAX Finds the largest value. Valid for numeric and character type data. MIN Finds the smallest value. Valid for numeric and character type data. NUMBER Counts the number of records in a table. Valid for all data types and the null value. STD Computes the standard deviation. Valid for numeric data. SUM Computes the sum of the values. Valid for numeric data. VARIANCE Computes the variance. Valid for numeric data. OF expression attribute_name Specifies expression or attribute_name to use in computations. Settings made in the COMPUTE statement execute when you select this specified attribute or expression in subsequent SELECT statements. To perform computations using an attribute without printing the result, execute the NOPRINT option in the COLUMN command against that attribute_name. ON expression attribute_name REPORT ROW Specifies expression or attribute_name to compute on. For a computation and break to occur on an attribute, you must also specify attribute_name in a BREAK command. When the break (change in data value) occurs, UniData SQL executes COMPUTE command computations. Prints the result of computations at the end of the report. Prints the result of computations and restart the computation for each row. Examples The following example demonstrates the use of COMPUTE to obtain the average price of all items in the ORDERS file: sql> COMPUTE AVG OF PRICE ON REPORT; sql> BREAK ON PRICE ON REPORT; sql> SELECT PRICE FROM ORDERS; Page 1 Price $ $1, $1, $ $ $29.97 $48.82 $34.97 $8.99 $ $ The next example demonstrates using the COMPUTE command to obtain daily sales totals: sql> sql> sql> sql> sql> BREAK ON ORD_DATE SKIP 1; COLUMN ORD_DATE HEADING "Order Placed On:" JUSTIFY CENTER; COMPUTE SUM OF PRICE ON ORD_DATE; SELECT CLIENT_NO, PRODUCT_NO, QTY, PRICE FROM ORDERS ORDER BY ORD_DATE; The final example shows a partial listing of the output produced by these statements: 26

27 CREATE INDEX CREATE INDEX The UniData SQL CREATE INDEX command creates an alternate key index on attribute_name in the table specified by table_name. The UniData SQL CREATE INDEX command also builds the index with data from the table being indexed. Note: The UniData SQL CREATE INDEX command performs the functions of both ECL commands CREATE.INDEX and BUILD.INDEX. The greater the number of records, the more an index reduces access time. In a table containing a large number of records, an index significantly reduces the amount of time required for a SELECT to display data (providing the SELECT statement has a search condition that takes advantage of the index). The alternate key attribute, designated by attribute_name, may be any D-type singlevalued or multivalued attribute, virtual attribute, or may be a phrase that contains only one attribute. For indexes based on virtual attributes, index_name must be the same as attribute_name. You can create indexes on different attributes in one data table; however, you cannot create more than one index on a single attribute. When you create the first index for a table, UniData SQL prompts you to enter a length for the alternate key. Note: CREATE INDEX does not check the data for duplicate records. To check for duplicate records when creating an index, use the ECL command CREATE.INDEX. Allocate a length that will accommodate the longest value in all attributes to be indexed. An adequate key length makes the index efficient but does not prevent it from accepting longer values. Maximum key length is 1020 plus the number you assign. The default key length is 20. Syntax CREATE INDEX index_name ON table_name (attribute_name) Examples The following example demonstrate creating an alternate key index for the INVENTORY table on the attribute PROD_NAME. The new index is named PROD_IDX. Because this is the first index to be created on INVENTORY, the user is prompted for alternate key length. sql> CREATE INDEX PROD_IDX ON INVENTORY (PROD_NAME); 27

28 Chapter 1: UniData SQL commands Alternate key length (default 20): 50 "PRODUCT" created One "*" represents 1000 records Building "PROD_IDX" record(s) processed. The next example demonstrates creating an index, then using it to decrease the length of time required to access data when a SELECT is performed on the indexed field. Without an index on CLIENT_NO, the same SELECT statement might take several times longer to retrieve the data. CREATE SUBTABLE The CREATE SUBTABLE command creates a UniData SQL view that presents values from the base table in such a way that those values can be viewed and updated using 1NF ANSI-standard SQL Data Manipulation Language (DML) commands. This enables you to update data in UniData SQL base tables using desktop tools that access these subtables through UniData ODBC. Syntax CREATE SUBTABLE subtable_name [(attribute_subtable_name [,attribute_subtable_name]...)] AS SELECT query_spec [PRIMARY KEY attribute_name[,attribute_name]...] [FOREIGN KEY attribute_name[,attribute_name]... REFERENCES subtable_name] 28

29 CREATE SUBTABLE Representing multivalues and multi-subvalues You must unnest multivalued and multi-subvalued attributes in the SELECT clause that is a part of the CREATE SUBTABLE statement. If you do not, the system displays an error message and does not create the subtable. Subtable requirements To represent the three nested levels of data within UniData SQL tables (singlevalued, multivalued, and multi-subvalued), you must create three subtables: one for each nested level. The nested levels are referred to as NL0, NL1, and NL2. NL0 subtable represents singlevalued attributes. NL1 subtable represents multivalued attributes. All multivalued attributes must be in the same association. NL2 subtable represents multi-subvalued attributes. All multi-subvalued attributes must be in the same association. These subtables are linked through primary and foreign keys. Note: You cannot create a single subtable that contains attributes from different associations or that combine more than one value type such as combining multivalued and multi-subvalued attributes. If you do, UniData returns an error message indicating the type of error, such as:a subtable cannot contain both MV and MS attributes. (Note that the foreign key, which is the primary key of the subtable or table at the next-higher level, is the only exception to this rule.) Primary and foreign keys The NL0 subtable defines the primary key. The purpose of a primary key is to specify one or more attributes whose data values are unique among all values for that record. UniData SQL does not allow a record to be added to a subtable with a duplicate key value. The primary key of the NL0 subtable becomes the foreign key in the NL1 subtable. To enable UniData SQL to locate the primary key, you name the NL0 subtable in the REFERENCES clause of the CREATE SUBTABLE statement that creates the NL1 subtable. To create an NL2 subtable, use the NL1 subtable s primary key as the NL2 table s foreign key, and list the NL1 subtable name in the REFERENCES clause. No primary key is required when you create an NL2 subtable, because no lower-level subtable will reference this (NL2) subtable. However, you may want to define a primary key for NL2 subtables to ensure the uniqueness of the data. The primary and foreign keys accomplish the same data relationships in subtables as associations do in UniData SQL base tables. The following table summarizes the number and value type of attributes required to create primary and foreign keys in subtables. Key Subtable Type NL0 NL1 NL2 Primary 1S 1 S, 1 MV 1 S, 1 MV, 1 MS Foreign n/a 1S 1 S, 1 MV Note: If you create an NL1 subtable without a primary key and later decide you want to create an NL2 subtable, you must drop the NL1 subtable and create an NL1 subtable with a primary key. After this, you can create an NL2 subtable that references the primary key in the NL1 subtable. 29

30 Chapter 1: UniData SQL commands Unique and generated keys You create one of the following types of primary or foreign keys for each subtable: Unique keys, in which the uniqueness of the key value depends on the data itself. In this case, actual attribute names are used in the PRIMARY KEY or FOREIGN KEY clauses. Generated keys, in which UniData SQL assigns a number to be part of each key value, so that the key value is unique even when the data itself is not. In this case, use NL1_KEY or NL2_KEY in the SELECT statement, rename the selected values, and use these new names in the PRIMARY KEY or FOREIGN KEY clause. The concept of unique and generated keys applies to both primary and foreign keys, because the foreign key of the referencing subtable is the primary key of the referenced subtable. Parameters The following table describes each parameter of the syntax. Parameter Description subtable_name Specifies the name of the new subtable. Subtable names can contain alphabetic characters, numbers, or the underscore character. ODBC prohibits the use of other special characters. The following restrictions apply to subtable names: The first character of the name cannot be a number. The subtable name must be unique among tables, subtables, and views in the database. The maximum length of a subtable name is 30 characters. attribute_subtable _name The name to be used for the attribute in this subtable. If you rename one attribute, you must list all attributes, even if you use the attribute name from the base table. You must rename attributes when an expression is included in query_spec. AS SELECT query_spec Selects data to include in the subtable. query_spec is defined in the SELECT statement section of this manual. You must unnest nested attributes to create a subtable through which you can update the base table. The SELECT clause cannot contain more than 255 virtual attributes. PRIMARY KEY attribute_name One or more attributes to use as the primary key for this subtable. If you rename an attribute (see the preceding description for attribute_subtable_name), you must use the new name here. FOREIGN KEY attribute_name One or more attributes to use as the foreign key for this subtable. The foreign key refers to the primary key of a subtable one nested level higher. If you rename an attribute (see renamed_attribute, above), you must use the new name here. REFERENCES subtable_name The corresponding subtable name, one nested level higher. The subtable name contains, as a primary key, the attribute_names listed in the FOREIGN KEY clause of this statement. Examples Unique key subtable The following statement creates an NL0 subtable that specifies a unique primary key. It does not rename any attributes, but uses attribute names from the dictionary of the CLIENTS table. Notice that 30

31 CREATE SUBTABLE the alias ID is used instead so that the subtable is ODBC accessible. Also, this NL0 subtable contains only singlevalued attributes from the CLIENTS base table. sql> CREATE SUBTABLE CLIENTS_NL0 AS sql> SELECT ID, FNAME, LNAME, COMPANY, sql> CITY, STATE, ZIP_CODE, COUNTRY sql> FROM CLIENTS sql> PRIMARY KEY ID; Subtable CLIENTS_NL0 created. The following SELECT statement lists the contents of this subtable: sql> SELECT * FROM CLIENTS_NL0 ORDER BY ID; Page 1 Client # 9965 First Name Gary Last Name Phillips Company Name Bank and Trust City New York State/Territory NY Postal Code Country USA Client # 9966 First Name Phil Last Name Becker Company Name Travelbooks, Inc. City Hawthorn State/Territory Vict.... Unnesting The following statement creates an NL1 subtable that is associated by foreign key to CLIENTS_NL0, which we just created: sql> CREATE SUBTABLE CLIENTS_NL1 AS sql> SELECT ID, PHONE_TYPE, PHONE_NUM sql> FROM CLIENTS sql> UNNEST PHONE_ITEMS sql> PRIMARY KEY ID, PHONE_TYPE sql> FOREIGN KEY ID REFERENCES CLIENTS_NL0; Subtable CLIENTS_NL1 created. The following statement displays the contents of CLIENTS_NL1: sql> SELECT * FROM CLIENTS_NL1 ORDER BY ID, PHONE_TYPE; Page 1 Client # Phone Cate Phone Number Fax Work Fax Work Fax Work

32 Chapter 1: UniData SQL commands Unnesting NL1 and NL2 The next series of examples demonstrates creating NL0, NL1, and NL2 subtables that are linked by primary and foreign keys. This first statement creates the NL0 subtable. Notice that this statement does not rename the attributes, but uses the attribute names from the CLIENTS table dictionary. The new subtable contains unique primary keys; no foreign key is allowed, because this is the top (NL0) level subtable. sql> CREATE SUBTABLE ORDER_NL0 sql> AS SELECT ID, CLIENT_NO, ORD_DATE, ORD_TIME sql> FROM ORDERS sql> PRIMARY KEY ID; Subtable ORDER_NL0 created. The following SELECT statement lists the contents of this new subtable: sql> SELECT * FROM ORDER_NL0; Page 1 Order Client Order Order Number Number Date Time /13/ :30PM /28/ :34PM /14/ :00PM /05/ :11AM /24/ :09PM /15/ :00AM /04/ :45AM /24/ :27PM /13/ :39AM /02/ :10PM 193 records listed The next example demonstrates creating the NL1 subtable. Notice that multivalued attributes are selected and unnested in the subtable. sql> sql> sql> sql> sql> sql> CREATE SUBTABLE ORDER_NL1 AS SELECT ID, PRODUCT_NO, PROD_NAME FROM ORDERS UNNEST PRODUCT_NO, PROD_NAME PRIMARY KEY ID, PRODUCT_NO FOREIGN KEY ID REFERENCES ORDER_NL0; The following SELECT statement displays the (unnested) multivalued table, ORDER_NL1: sql> SELECT * FROM ORDER_NL1; Page 1 Order Number Product Nu Product Na Printer Cartridge Computer Computer Memory Memory Memory Hard Drive Hard Drive 32

33 CREATE TABLE Hard Drive Hard Drive Hard Drive Disk Drive... Page 32 Order Number Product Nu Product Na Adapter Modem 487 records listed The next example demonsrates creating the NL2 subtable, which unnests the multi-subvalued attributes: sql> CREATE SUBTABLE ORDER_NL2 sql> AS SELECT ID, PRODUCT_NO, COLOR, QTY, PRICE, EPRICE sql> FROM ORDERS sql> UNNEST PRODUCT_NO, COLOR, QTY, PRICE sql> FOREIGN KEY ID, PRODUCT_NO REFERENCES ORDER_NL1; Subtable ORDER_NL2 created. The final example displays a portion of the NL2 subtable: sql> SELECT * FROM ORDER_NL2; Page 1 Order Number Product Nu Color Qty Price Extended Pri N/A 6 $ $ Gray 1 $1, $1, Gray 10 $1, $13, Gray 5 $ $ Standard 25 $ $10, Yellow 13 $29.97 $ Silver 15 $48.82 $ Silver 999 $34.97 $34, records listed CREATE TABLE The CREATE TABLE command performs two functions: Creates a new base table in your database. Stores the attribute definitions in the table s dictionary. UniData SQL automatically creates the singlevalued at location 0; the display name is the name of the table, the format is 10L, indicating a character attribute 10 characters long, and it is left-justified. attribute_definition is explained in Defining attributes, on page 81 Note: If quotation marks are included in the definition, use single quotationmarks in embedded definitions; for example: TRANS( clients, client_nbr, client, X ) 33

34 Chapter 1: UniData SQL commands Syntax CREATE TABLE table_name (attribute_definition[,attribute_definition]...) [MODULO modulo_number] [DYNAMIC [KEYONLY KEYDATA]] [TRANSACTION RECOVERABLE] attribute_definition syntax: attribute_name {CHAR(size[, conv_code ]) DATE[({ date_conv time_conv })] NUMBER[({size size,n *}[, conv_code ])] LONG] [IDESC VIRTUAL ( virt_definition )] [LOC(n)] [DISP( display_name )] [FORMAT( fmt_desc )] [SM( {S MV MS} )] [ASSOC( assoc_name )] Parameters The following table describes each parameter of the syntax: Parameter Description table_name Specifies the name of the new table. Valid table names can contain alphabetic characters, numbers, and the following special characters: #, and $. If you plan to access the data in a table, subtable, or view via ODBC, do not #, or $ anywhere in the table name, and do not use an underscore (_) as the first character. The following restrictions apply to table names: The table name cannot be longer than 30 characters. The first character of the name cannot be a number. The table name must be unique among tables, subtables, and views in the database. The table name cannot be a UniData SQL reserved word. 34

35 Assigning modulo Parameter Description attribute_definition The following elements make up attribute_definition. You must include data type immediately after each attribute name you define. The other elements are optional and can be entered in any order. Attribute name (required) Data type (required) Location relative to the beginning of the record Virtual attribute definition Display name Format description Value type specification (Default is singlevalued S) Association name System default format and conversion are assigned based on data type when neither is specified. These defaults are provided in the data type sections of Defining attributes, on page 81. MODULO no_blocks[, block_size] Controls the size of the table by assigning block size and number of blocks to store the data. DYNAMIC Creates a dynamic table. For further information on dynamic tables, see Administering UniData on UNIX or Administering UniData on Windows Platforms. KEYONLY Used only with the DYNAMIC keyword. Sets the split/merge type for a dynamic file to KEYONLY, meaning that the load factor in each group is based on keys and pointers only. This is the default split/merge type. KEYDATA Used only with DYNAMIC keyword. Sets the split/merge type for a dynamic file to KEYDATA, meaning that the load factor in each group is based on keys and pointers plus data. This syntax is explained in Assigning modulo, on page 35 For further information about split/merge types, see the UniData Commands Reference manual. TRANSACTION RECOVERABLE Creates a recoverable table. TRANSACTION and RECOVERABLE are synonyms. For further information on recoverable tables, see Administering the Recoverable File System on UNIX or Administering the Recoverable File System on Windows Platforms. Assigning modulo UniData SQL reserves space on the disk to be used for the table based on the modulo number, which determines the size of the table by assigning a specific number of blocks to store the data as well as the size of the blocks. The default modulo is 1 for static files, and 3 for dynamic files. Setting the modulo properly minimizes system overhead in the future. The purpose of deciding on the best modulo number is to cause UniData SQL to allocate the appropriate number of blocks of disk space when the table is created. If you set modulo too small and the table becomes very large, the system has to handle the overflow of newly inserted data at that time, which is very inefficient. Table access (SELECT, UPDATE, and so forth) will be slower than if the table had been properly sized. 35

36 Chapter 1: UniData SQL commands There are two kinds of overflow: Level-1 and Level-2. Static hashed tables created with too small of a modulo experience Level-2 overflow as they become larger, and ALTER TABLE MODULO can correct the problem. Dynamic tables adjust their own modulo automatically as the table expands and contracts. For further information on UniData SQL file types, see Administering UniData on UNIX or Administering UniData on Windows Platforms. Syntax MODULO no_blocks[, block_size] Parameters The following table describes each parameter of the syntax. Parameter Description no_blocks Numbers of blocks required to store the data; must be a prime number. (Also controls data hashing.), block_size_multiplier A number, 1 16, multiplied by 1024, indicating block size (or 0, indicating a block size of 512). Default block size is usually 1024 bytes, although it may be configured. For further information, see your system administrator. 0 UniData SQL assigns the smallest block size, 512 bytes. >16 UniData SQL interprets as 16. <1 UniData SQL interprets as 0. Procedure Follow the steps outlined below to determine MODULO setting: Determine the block size. Choose a larger block size for tables that store very long records or a large number of records. Calculate the average number of records stored in one block. records per block=(block_size - 32)/(avg. recordlength + 9) avg. record length is the estimated average length of the records you plan to store in the table. Tip: The FILE.STAT command reports the average number of bytes in a record Divide the estimated number of records you plan to store in the table by the records per block number. no. of records/records per block Round up the results to the closest prime number. This is no_blocks, the minimum number of blocks your table must have. Tip: Use the ECL command PRIMENUMBER to obtain the prime number closest to the number you calculate. Examples The following statement creates a table, NEW_TAB, that has three attributes: one character and two numeric. The numeric attribute MONEY_FLD contains a conversion code that formats dollars with two decimal places, preceding negative numbers with a minus sign (-). sql> CREATE TABLE NEW_TAB 36

37 Assigning modulo sql> (NUM_FLD NUMBER, sql> CHAR_FLD CHAR(10), sql> MONEY_FLD NUMBER(10,"MD2$,-")); 3 attribute(s) added. Create file NEW_TAB, modulo/1,blocksize/1024 The following example lists the dictionary entry for this table: The next statement creates a table that has the following attributes: CHAR_FLD data type character, length of 5 DATE_FLD data type date, formatted as mm/dd/yy NUM_FLD data type numeric, formatted with preceding dollar sign; including two decimal places CHAR2_FLD data type character, length of 12, centered within a column 25 characters wide sql> CREATE TABLE TEST_TAB (CHAR_FLD CHAR(5), DATE_FLD DATE("D2/"), sql> NUM_FLD NUMBER(15,"MD2$"), CHAR2_FLD CHAR(12) FORMAT("25C")); 4 attribute(s) added. Create file TEST_TAB, modulo/1,blocksize/1024 The following example creates a table that contains a virtual field, VIRT_FLD, which displays the results of multiplying NUM_FLD and MONEY_FLD: 37

38 Chapter 1: UniData SQL commands CREATE VIEW The CREATE VIEW command defines a view of base tables or existing views. You can update a base table through a view in UniData SQL unless the view was created by a join. Syntax CREATE VIEW view_name [(view_attribute_name [,view_attribute_name...])] AS SELECT query_spec Parameters The following table describes each parameter of the syntax. Parameter Description view_name Specifies the name of the new view. View names may contain alphabetic characters, numbers and the underscore character. ODBC prohibits the use of other special characters. The following restrictions apply to view names: The first character of the name may not be a number. The view name must be unique among tables, subtables, and views in the database. The maximum length of the view name is 30 characters. 38

39 CREATE VIEW Parameter Description view_attribute_name Specifies a name for the attribute in the new view. The first character must be an alphabetic character or underscore (_). Consists of the following elements: Alphabetic characters Numbers The number of attribute_names in CREATE VIEW must be the same as the number of attribute_names or expressions in the SELECT clause. AS SELECT query_spec Selects data to include in the view. query_spec is defined in the SELECT statement section of this manual. Example The following example creates a view that includes all products of colors that begin with the letter B. The subsequent SELECT statement displays part of the data retrieved by that view. sql> CREATE VIEW NEW_VIEW sql> AS SELECT * FROM INVENTORY sql> WHERE COLOR LIKE B% ; View NEW_VIEW created. sql> sql> sql> sql> SELECT ID, PROD_NAME, COLOR FROM NEW_VIEW UNNEST COLOR ORDER BY PROD_NAME; 39

40 Chapter 1: UniData SQL commands DELETE The DELETE command eliminates records from a table, subtable, or view. If no search_condition is specified, but an ID_list is present, all records in the ID_list are deleted. Warning: If search_condition and ID_list are not specified, all records in the table are deleted. Syntax DELETE FROM table_spec [table_label] [ID_list] [WHERE search_condition] Parameters The following table describes each parameter of the syntax. Parameter Description FROM table_spec Specifies the table, subtable, or view from which records are to be deleted. table_label Specifies an alias for a table from which records are to be deleted. ID_list Limits search_condition to only those records whose ID or key is listed in ID_list. ID_list may be applied to a base table only, not to a view or subtable. WHERE search_condition Selects records to delete. If search_condition is applied to: A singlevalued attribute, UniData SQL deletes the entire record. A multivalued attribute, UniData SQL deletes all values that meet the criteria. However, even if all values in the multivalued attribute are deleted, values in singlevalued attributes of the same record remain. A multi-subvalued attribute, UniData SQL deletes all values that meet the criteria. However, even if all values in the multi-subvalued attribute are deleted, values in multivalued attributes in the same record remain. You can delete a record based on WHERE virtual_fld = value. Within a WHERE clause, the sum total of the individual conditions and the Boolean operators cannot exceed 127. For information on writing WHERE clauses, see Using UniData SQL. Examples The following example shows how to delete single and multiple attributes: sql> DELETE FROM CLIENTS WHERE ID = 9729; 1 record(s) deleted or updated. The following statement deletes all records from the CLIENTS table: sql> DELETE FROM CLIENTS; 129 record(s) deleted or updated. The following example displays the data in the multivalued attribute COLOR before a record is deleted: 40

41 DROP INDEX Next, the record containing the Rose-colored wrist rest is deleted: sql> DELETE FROM INVENTORY sql> WHERE PROD_NAME LIKE "Wrist%" AND COLOR = "Rose"; 1 record(s) deleted or updated. Finally, we execute the same SELECT statement as it was executed before the deletion to demonstrate the deletion: DROP INDEX The DROP INDEX command deletes the index specified by index_name for table_name. The index must have been created by: UniData SQLCREATE INDEX command. ECL CREATE. INDEX command. Note: Only the owner of a table may drop an index from that table. Syntax DROP INDEX index_name FROM table_name 41

42 Chapter 1: UniData SQL commands Example The following example demonstrates creating and dropping an index: sql> CREATE INDEX ORDER_IDX ON ORDERS(CLIENT_NO); "ORDER_IDX" created One "*" represents 1000 records Building "ORDER_IDX" record(s) processed. sql> DROP INDEX ORDER_IDX FROM ORDERS; "ORDER_IDX" deleted DROP SUBTABLE The DROP SUBTABLE command drops a subtable that was created by a CREATE SUBTABLE statement. It also drops all views created on the subtable, but it does not affect the base table. Dropping a high-level subtable makes invalid all subtables that reference it. So, before you drop a subtable, be sure to drop all subtables that reference it. Syntax DROP SUBTABLE subtable_name; Example The following example demonstrates creating and dropping a SUBTABLE: sql> sql> sql> sql> CREATE SUBTABLE ORDERS_TST AS SELECT ID, ORD_DATE, ORD_TIME, CLIENT_NO FROM ORDERS PRIMARY KEY ID; Subtable ORDERS_TST created. sql> DROP SUBTABLE ORDERS_TST; Subtable ORDERS_TST has been dropped. DROP TABLE The DROP TABLE command removes a base table from the database, deletes the table definition, and deletes all subtables and views that are based on the table. Only the person who created a table can drop it. UniData SQL prompts for confirmation before dropping the table. Warning: You cannot recover a dropped table. Syntax DROP TABLE table_name 42

43 DROP VIEW Example The following example demonstrates creating a table, listing its dictionary, and deleting the table: DROP VIEW The DROP VIEW command removes a view from the database. This command automatically drops any views that are subordinate to the dropped view. Only the owner of a view can drop it. Syntax DROP VIEW view_name Example The following example demonstrates creating a view, using it, deleting it, and then attempting to use it after it has been deleted: 43

44 Chapter 1: UniData SQL commands EXIT The EXIT command quits UniData SQL and returns the cursor to the environment from which you entered UniData SQL. The EXIT command performs the same function as QUIT. Note that you do not conclude the EXIT or QUIT command with a semicolon. Note: If you entered UniData SQL from the ECL prompt, EXIT returns you to the ECL prompt. When you return to UniData SQL in the same session, your UniData SQL statement stack is restored. If you entered UniData SQL from the operating system prompt, when you issue the EXIT command, you return to the operating system prompt and all statement stack contents are lost. Syntax EXIT Examples sql> EXIT : GRANT The GRANT command specifies access privileges on tables, subtables, and views. When a user creates a UniData SQL table, subtable, or view, the user owns the object. The owner is initially the only user who can access the object. If other users need to use the table, subtable, or view, 44

45 GRANT the owner must grant them rights to access it. These access rights are called privileges. The owner can add, change, and view privileges for other users. If the owner grants privileges to another user with grant option, that user can grant any of the same privileges for the table, subtable, or view to other users. If you attempt to grant privileges on a table, view, or subtable for which you do not have privileges, or on an object that does not exist, the following error message appears: Sorry, you have no privilege on this file! Only the owner can drop tables, subtables, or views, and create and drop indexes. Tip: To learn who is the owner of a table, execute the UNIX command ls -lfilename at the UNIX prompt. You can also check the contents of the privilege table by executing the following: select * from privilege; Syntax GRANT {ALL PRIVILEGES privilege[,privilege]... ON table_spec TO {PUBLIC user_name [,user_name]...} [WITH GRANT OPTION] Parameters The following table describes each parameter in the syntax. Parameter Description ALL PRIVILEGES Grants all privileges the user of the command is allowed to grant. If the user is the owner of the object, all privileges are DELETE, INSERT, SELECT, and UPDATE. If the user is not the owner of the object, the user can grant only those privileges acquired with grant option. privilege Specifies privilege(s) to grant the user(s): DELETE Privilege to delete rows from a table, subtable, or view. INSERT Privilege to insert rows in a table, subtable, or view. SELECT Privilege to select data in a table, subtable, or view. UPDATE Privilege to change values in a table, subtable, or view. ON table_spec Specifies the table, subtable, or view on which to grant privileges. TO PUBLIC Grants privilege to all users who have access to the server machine. TO user_name Grants access to the user specified by user_name. WITH GRANT Gives the recipient(s) permission to grant the privileges they acquired on this table, OPTION subtable, or view. The value of the grant-op attribute of the privilege file can be either of the following: 0 = No grant option specified 1 = Grant option specified 45

46 Chapter 1: UniData SQL commands Note: UniData SQL does not display a confirmation message when you grant or revoke privileges. Examples The following example creates a view on the INVENTORY table, then grants all privileges to everyone: sql> sql> sql> View sql> CREATE VIEW NEW_VIEW AS SELECT * FROM INVENTORY WHERE COLOR LIKE "B%"; NEW_VIEW created. GRANT ALL PRIVILEGES ON NEW_VIEW TO PUBLIC; The following statement grants UPDATE privilege to user samh: sql> GRANT UPDATE ON NEW_VIEW TO samh; INSERT The INSERT command adds rows to an existing table. Rows can be inserted into an empty table or into a table that already contains data. You cannot insert duplicate values in attribute. If conflicting aliases exist for a location of the target table, you must specify attribute_name. Conflicting aliases have different formats, conversion codes, and so on. To insert literal numeric or string values, use the first form of the syntax, enclosing string values in quotation marks. To select data from another table and insert it into a table, use the second form of the syntax. query_spec is described under SELECT. If no attribute_names are specified, the query_spec or VALUES list must contain one value for each data location in the dictionary for that table. The data values are inserted in order of location. Warning: If two subtables map to the same association, but specify different primary keys, UniData SQL has no way of ensuring that primary keys are unique. This could result in duplicate values being added through UPDATE or INSERT, or in more than one row being updated by UPDATE. Syntax INSERT INTO table_spec [(attribute_name [, attribute_name...])] VALUES (const_value [,const_value...]) INSERT INTO table_spec [(attribute_name [, attribute_name...])] query_spec Forms of INSERT A value is always required. The INSERT statement has two forms: 46

47 INSERT An INSERT statement with a VALUES clause inserts one row into a table: If attribute_name(s) are specified, the number and data type of attribute_name(s) and const_value(s) must match. The sequence and data type of const_valuesmust match those of the target attributes. If an attribute is character or date data type, you enclose the value to be inserted in quotation marks. If you include or its alias must be included in the list of attribute_name(s). If the NULL_FLAG is set to 0 (off), the NULL keyword inserts an empty string (""). If the NULL_FLAG is set to1 (on), the following rules apply: You can use the NULL keyword with the INSERT or UPDATE command to insert the null value into a singlevalued attribute. You can use the NULL keyword with the INSERT or UPDATEcommand to insert the null value into a multivalued or multi-subvalued attribute if it is the only value. You cannot use the INSERT or UPDATE command to add the null value along with other values into a multivalued or multi-subvalued attribute. This is because UniData SQL cannot recognize the keyword NULL embedded in a quoted string such as D NULL I. You must first create the record, then use the UPDATE command to change existing values to null or to append null values. The null value is not valid Regardless of whether null value handling is on or off, you can insert a missing value by omitting an attribute s value in a value list. An INSERT statement with a query_spec clause inserts a set of attribute values from one or more tables into another table: The values to be inserted are determined by query_spec. If attribute_name(s) are specified, the number and data types must be the same as in query_spec. You cannot insert into the table from which you are selecting attributes in query_spec. Parameters The following table describes each parameter of the syntax. Parameter Description INTO Required keyword for inserting into a table. table_spec Specifies the table, subtable, or view to receive inserted data. attribute_name Specifies the attribute(s) to receive inserted data. If you specify attribute_names, you must include or its alias. attribute_names may be listed in any order; but the values included in the VALUES list must be listed in the same order. No duplicate locations or virtual attributes may be included. 47

48 Chapter 1: UniData SQL commands Parameter Description VALUES const_value Specifies a constant value to be inserted. Character, date, and time strings must be enclosed in quotation marks. Enter integer and decimal values without quotation marks. May be singlevalued, multivalued, multi-subvalued, or the null value. A singlevalued constant may be a number or an alphanumeric string. You cannot add multivalues and multi-subvalues in the same string. To insert more than one value in a multivalued or multi-subvalued attribute, you must enclose them in quotation marks even if the data values are numeric; you must also include the correct delimiter. query_spec For a complete description of query_spec, see the SELECT command. You cannot include a phrase in the expression included in query_spec. Doing so results in a UniData SQL error. You can include subqueries in query_spec. Examples The following statement inserts a new inventory item into the INVENTORY table. A value must be included for each attribute because no attribute_name list is included. sql> INSERT INTO INVENTORY VALUES (9999, "3/26/96", "10:30","Camcorder Bag", "Water-resistant Nylon", "Silver}Gray", "600}600", "25.97}25.97", "70}70"); 1 record(s) created. The following example inserts a new record, 19999, into the INVENTORY table. No value is entered for PROD_NAME, INV_DATE, or INV_TIME, so these attributes are assigned no values. LISTDICT The LISTDICT command lists the dictionary of a UniData SQL table. table_spec specifies the table, subtable, or view for which to list the dictionary. 48

49 LOCK TABLE Syntax LISTDICT table_spec Example The following example lists the dictionary for the CLIENTS table: LOCK TABLE LOCK TABLE overrides UniData s automatic locking system, providing a means of explicitly controlling the locking of tables. LOCK TABLE is the only UniData SQL command that explicitly locks tables. For an explanation of the UniData locking scheme, see Administering UniData on UNIX or Administering UniData on Windows Platforms. Examples of situations in which you should use LOCK TABLE: A transaction accesses many files, but you need to isolate only one key file from other transactions. LOCK TABLE allows you to specify a lower-level isolation (such as RC) for a transaction, while locking a file at a higher level. An application may eventually lock almost all records in a file. UniData SQL locks records as they are needed, then converts to a file lock when the maximum number of record locks is reached. This can result in a deadlock. To avoid this, use LOCK TABLE to lock the file at the beginning of the application. A batch process that updates records. When LOCK TABLE is issued and no transaction is active, UniData SQL starts a new transaction. Upon termination of the transaction, all locks are released. When an application requests a file lock against records that are already locked by another user, the application waits until the locks are released. This can appear to be a system or terminal hang to the user. Include the NOWAIT keyword to avoid this. 49

50 Chapter 1: UniData SQL commands UniData SQL allows a maximum of 128 files to be locked within a transaction, including systemimposed locks as well as those you set explicitly. Syntax LOCK TABLE table_name [,table_name...] IN {SHARE EXCLUSIVE} MODE [NOWAIT] Parameters The following table describes each parameter of the syntax. Parameter Description table_name Specifies the table to be locked. IN SHARE MODE Indicates that a shared lock is to be placed on the table. IN EXCLUSIVE Indicates that an exclusive lock is to be placed on the table. MODE NOWAIT Directs UniData SQL to abort the transaction rather than wait for a lock to be released. Note: If you do specify NOWAIT and include several files in single LOCK TABLE command, and any one of the files is already locked, the command fails. QUIT The QUIT command exits UniData SQL unconditionally and returns the user to the environment from which that user entered UniData SQL. QUIT performs the same function as EXIT. Notice that the EXIT and QUIT commands do not include semicolons. Note: If you enter UniData SQL from the ECL prompt, QUIT returns you to the ECL prompt. If you return to UniData SQL in the same session, your UniData SQL statement stack is saved. If you enter SQL from the operating system prompt, QUIT returns you to the operating system prompt, and the UniData SQL statement stack is lost. Syntax QUIT Example sql> QUIT : REVOKE The REVOKE command removes access to tables, subtables, or views for which privilege was granted with the GRANT command. The REVOKE command enables you to revoke privileges for specific users or for all users. 50

51 ROLLBACK Note: If you want to revoke only the ability to grant options, you must REVOKE the privilege first, then grant the privilege without grant option. Syntax REVOKE {ALL PRIVILEGES privilege[,privilege]...} ON table_spec FROM {PUBLIC user_name[, user_name]...} Cascading of REVOKE When you revoke privileges for a user, any assignment that user has made is also revoked, as illustrated by the following scenario: User A owns TABLE_A and grants SELECT privilege (with grant option) on TABLE A to user B. Then, user B grants SELECT privilege on the table to user C. If user A revokes the SELECT privilege on TABLE_A from user B, it is automatically revoked for user C. Parameters The following table describes each parameter of the syntax. Parameter Description ALL PRIVILEGES Revokes all privileges the user of the command possesses. privilege Specifies privilege(s) to revoke: If the user is the owner of the object, all privileges are DELETE, INSERT, SELECT, and UPDATE. DELETE Privilege to delete rows from a table or subtable. INSERT Privilege to insert rows in a table or subtable. SELECT Privilege to select data in a table, subtable, or view. UPDATE Privilege to change values in a table or subtable. ON table_spec Specifies the table, subtable, or view for which privileges are to be revoked. FROM Identifies the user for whom privileges are to be revoked. PUBLIC Revokes specified privileges for all users with access to the server machine. user_name Revokes specified privileges for the user indicated by user_name. Example sql> REVOKE ALL PRIVILIEGES ON NEW_VIEW FROM PUBLIC; Note: UniData SQL does not display a confirmation message when you grant or revoke privileges. ROLLBACK The UniData SQL ROLLBACK command cancels an active transaction. UniData SQL discards pending writes and releases all locks acquired during the transaction. The optional keyword WORK is provided for backward compatibility with legacy systems. 51

52 Chapter 1: UniData SQL commands With the ROLLBACK command, UniData undoes all commands issued from the beginning of the transaction and does not make any updates for the transaction. Not all rollbacks are user-initiated. In addition to your ability to explicitly execute the ROLLBACK command in an application program, UniData can automatically roll back a transaction when it encounters any of the following conditions: File-access errors (such as no privilege or violation of operation system level security). Locking errors, such as deadlocks. Invalid command or invalid command syntax. Syntax ROLLBACK [WORK] SELECT The SELECT command retrieves data from the database. A select statement (select_stmt) consists of a query specification (query_spec), plus (optionally) one or more UNION clauses, ORDER BY clauses and/or one of the following: TO, INTO, or LPTR. select_stmt and query_spec are also clauses in some other statements, including CREATE SUBTABLE, CREATE VIEW, and INSERT. The keywords SELECT and FROM are required; all other keywords are optional. All keywords must be used in the order they are listed in the above syntax. The required clauses provide the following information: The SELECT clause tells UniData SQL what information to retrieve. The FROM clause tells UniData SQL where to find the information to retrieve. In a SELECT statement, you cannot select more than 1000 attributes and expressions. A SELECT statement or clause cannot contain more than 255 virtual attributes. Syntax Query Specification (query_spec): SELECT [ ALL DISTINCT ] { * { attribute_spec expression} [ attribute_label ] [, {attribute_spec expression} [ attribute_label ]...] } FROM{XMLDATA xml_data extraction_file table_spec [ table_label ] [ ID_list ] [ [ INNER { LEFT RIGHT FULL } [ OUTER ] ] JOIN table_spec [ table_label ] [ ID_list ] { ON search_condition USING ( attribute_name [, attribute_name...] ) }...] [, table_spec [ table_label ] [ ID_list] [ [ INNER { LEFT RIGHT FULL } [ OUTER ] ] JOIN table_spec [ table_label ] [ ID_list ] { ON search_condition USING ( attribute_name [, attribute_name...] ) }...]...]} [ UNNEST [ NL1 NL2 NL_ALL ] { association_name attribute_name} [, {association_name attribute_name}...] ] [ WHERE search_condition] [ GROUP BY { attribute_name expression} 52

53 SELECT [, { attribute_name expression }...] [ HAVING condition ] ] Select Statement (select_stmt): query_spec [ UNION query_spec...] [ ORDER BY { attribute_spec ordinal_position expression } [ ASC DESC ] [ EXP ] [, {attribute_spec ordinal position} [ ASC DESC ] [ EXP ]...] ] [ TO filename INTO temp_table LPTR ] [TOXML [ELEMENTS] [WITHSCHEMA] [WITHDTD] [XMLMAPPING mapping_file]] [XMLDATA extraction_mapping_file][sample n]; query_spec parameters The following table describes each parameter of the syntax. Parameter Description ALL Default. Returns every row selected by query_spec, including duplicate rows. DISTINCT Returns every unique row selected by query_spec. Duplicates are filtered out. * Selects all D-type attributes. Does not retrieve virtual fields. You may not include attribute_name or expression with *. May be qualified by a table name or table label by preceding the attribute name with the table name/label and a period, as follows: table_name.* table_label.* attribute_spec Specifies one or more attributes to retrieve. May be qualified by preceding the attribute name with the table name/label and a period, as follows: table_name.attribute_name table_label.attribute_name To select virtual fields, you must explicitly name them. expression Any combination of attribute names, constants, arithmetic operators, and UniData SQL functions that together select data. Expressions that contain spaces must be enclosed in quotation marks. For information on writing expressions, including the operators and functions you can use, see Using UniData SQL. attribute_label Specifies the display name for an attribute. Display names are used as column headers. FROM Directs UniData SQL to the tables where the attribute_names are stored. The FROM clause is a required element of the SELECT statement. UniData SQL allows you to query multiple tables and views in a single statement. table_spec Specifies the table, subtable, or view from which data values are selected. table_label Specifies an alias for a table. ID_list Restricts record selection to records with record IDs in ID_list. INNER Use in conjunction with the JOIN keyword. Performs an inner join of the tables included in the FROM clause. Retrieves only rows that meet the join condition. Therefore, rows in the result set have matching values in the attributes on which the join is based. 53

54 Chapter 1: UniData SQL commands Parameter Description {LEFT RIGHT FULL} [OUTER] Use in conjunction with the JOIN keyword. Performs an outer join of the tables included in the FROM clause. Retrieves all rows that meet the join criteria, but it also retrieves additional unmatched rows based on whether it is a left or right outer join. These additional rows come from the left (the table preceding the JOIN keyword), right (the table following the JOIN keyword), or both tables. The keywords refer to the following: LEFT A left outer join retrieves all rows from the left table (the table preceding the JOIN keyword), including those for which no matching value exists in the joined table. In addition, it includes rows for which values in the attributes match (these are the same rows included in the inner join). Finally, it places null values in all columns of the result table that come from the right table for all unmatched rows. RIGHT A right outer join retrieves all rows from the right table (the table preceding the JOIN keyword), including those for which no matching value exists in the joined table. In addition, it includes rows for which values in the attributes match (these are the same rows included in the inner join.) Finally, it places null values in all columns of the result table that come from the left table for all unmatched rows. FULL A full outer join retrieves all rows from both tables listed in the JOIN clause, combining the results from the left and right outer joins. Therefore, all rows from both tables are included, and those for which the attributes match are combined. Finally, it places null values in all columns of the result table for all unmatched rows. OUTER Optional keyword to specify an outer join (LEFT, RIGHT, and FULL keywords produce outer joins). For examples of LEFT RIGHT and FULL OUTER joins, see Using UniData SQL. JOIN Indicates that a table or tables are being joined. If you include JOIN, you must also include ON or USING. A join uses data from one attribute to obtain data from another. For instructions on joining tables, see Using UniData SQL. ON search_condition Use in conjunction with the JOIN keyword. The conditional test that selects records for the join. If you mention more than one table in a SELECT statement, but don t include a join condition, a Cartesian product results. USING (attribute_name) Use in conjunction with the JOIN keyword. Specifies the attribute on which the join is based. Records are selected when values in the joined attribute from both tables are equal. USING (attribute_name) produces the same effect as ON table1.attrib_name = table2.attrib_name. UNNEST NL1 NL2 NL_ALL Unnests data stored in multivalued and multi-subvalued attributes. Unnesting repeats the values in the associated attribute one level up. The optional keywords NL1, NL2, or NL_ALL provide different levels of unnesting. For a description of these options, see the UNNEST options table in the next section. The UNNEST clause can process 10,240 values in a multivalued or multisubvalued attribute, or in all associations for the unnested record. 54 attribute_name Specifies an attribute to unnest. association_name Specifies an association to unnest. Unnests all associated attributes that are selected from the named association.

55 UNNEST options Parameter Description WHERE search_condition Returns values that meet the criteria specified in search_condition. WHERE evaluates multivalues and multi- subvalues individually, as if they had been unnested. search_condition takes the form: attribute_name/expression rel_op attribute_name/ expression The following keywords and operators can be used in the WHERE clause: =,!=, <, <=, >, >=, <>,!<,!> ALL EVERY subquery NOT IS [ NOT ] NULL [ NOT ] BETWEEN [ NOT ] IN [ NOT ] INTERSECT [ NOT ] LIKE %, _,..., na, nn, nx AND OR For examples that demonstrate the use of these elements, see Using UniData SQL. Within a WHERE clause, the total number of predicates and Boolean operators cannot exceed 127. GROUP BY attribute_spec expression Groups information according to attribute_spec or expression in preparation for computing, breaking, and summarizing by categories. HAVING condition Additional criteria that qualifies using aggregate functions. search_condition. condition takes the form: attribute_name/expression rel_op attribute_name/ expression For example: HAVING fld1 = fld2 + 5 rel_op may also be a Boolean operator (AND, OR). SAMPLE n Limits the number of rows returned by a SELECT statement to a defined sample size n. UNNEST options All of the multivalued attributes and multi-subvalued attributes included in a single UNNEST clause must belong to the same association. Executing an UNNEST on unassociated attributes results in a Cartesian product. UNNEST with no option specified unnests all specified associated attributes. Syntax UNNEST [NL1 NL2 NL_ALL]{mv_attribute ms_attribute association_name} The following table describes the options for the keyword UNNEST. 55

56 Chapter 1: UniData SQL commands Option Description NL1 Specify NL1 to unnest associated multivalued attributes. Repeats the values in singlevalued attributes. NL2 Specify NL2 to unnest associated multi-subvalued attributes. Repeats the values in the associated multivalued attribute. NL_ALL Specify NL_ALL to unnest all associated multivalued and multi-subvalued attributes. Singlevalued attributes are repeated for each multivalued attribute, and multivalued attributes are repeated for each multi-subvalued attribute. NL_ALL has the effect of both NL1 and NL2 combined. mv_attribute Name of the multivalued attribute to be unnested. ms_attribute Name of the multi-subvalued attribute to be unnested. association _name Name of the association to be unnested. Guide to unnesting The following table provides the syntax to unnest to each level. The level of unnesting is determined by a combination of the UNNEST option and the type of value (S, MV, or MS) of the attributes involved: To unnest this level Use this syntax Multivalue only UNNEST mv_attribute UNNEST NL1 association UNNEST NL1 mv_attribute UNNEST NL1 ms_attribute UNNEST NL1 mv_attribute, ms_attribute UNNEST NL_ALL mv_attribute Multi-subvalue only UNNEST ms_attribute UNNEST NL2 association_name UNNEST NL2 ms_attribute UNNEST NL2 mv_attribute, ms_attribute (UNNEST NL2 mv_attribute is invalid) Multivalue and Multi- subvalue UNNEST association_name UNNEST mv_attribute, ms_attribute UNNEST NL_ALL ms_attribute UNNEST NL_ALL association_name UNNEST NL_ALL mv_attribute, ms_attribute select_stmt parameters The following table describes each parameter of the select_stmt syntax. 56 Parameter Description query_spec query_spec is the first required element in the SELECT statement. query_spec parameters are described in the first table in this section.

57 Simple statement examples Parameter Description UNION query_spec Combines the results of two query_spec statements into a single result set. The number of selected items in both queries must be the same; and the corresponding attributes must be of the same data type. When results of all query_spec statements are combined, duplicate records are discarded. ORDER BY attribute_spec ordinal_position Arranges rows in sorted order based on attribute value or ordinal position. Explanations for attribute_spec and ordinal_position follow. attribute_spec Specifies an attribute to use as a sort field. May be an individual attribute name preceded by the table name/label and a period, as follows: The ORDER BY clause may contain no more than nine attribute names or ordinal positions. table_name.attribute_name table_label.attribute_name To sort virtual fields, you must explicitly name them. ordinal_position Arranges rows by the attribute(s) you indicate. Ordinal position is determined by the order in which attributes and expressions are listed in query_spec. The first attribute or expression is in ordinal position 1. For example, in the following statement: SELECT ID, PRODUCT_NO, QTY FROM ORDERS UNNEST PRODUCT_NO ORDER BY ID, PRODUCT_NO; the ORDER BY clause could also be written as follows to obtain the same results: ORDER BY 1,2 expression ASC Any combination of attribute names, constants, arithmetic operators, and UniData SQL functions that together return a value that determines how data will be ordered. Expressions that contain spaces must be enclosed in quotation marks. You may set an attribute to the null value with an expression like this: attribute_name = NULL. Orders data in ascending order lowest value to highest value. This is the default order. DESC Orders data in descending order highest value to lowest value. EXP Unnests multivalues and multi-subvalues before ordering. TO filename Places results of the SELECT in a sequential file. INTO temp_table LPTR Places results of the SELECT in a temporary table. Prints results of the SELECT on the system printer. Simple statement examples The following example selects all attributes from the CLIENTS table: 57

58 Chapter 1: UniData SQL commands 58

59 Unnesting The following statement selects all rows containing the product name Camera from the INVENTORY table. The query requests the price of the most expensive camera and the total number of cameras of that color in the database, as well as counting the number of rows containing each color of camera. Unnesting The following examples demonstrate execution of SELECT statements with and without unnesting. Two records that contain multi-subvalues are used. Note: More examples of unnesting are provided in Unnesting all attributes in an association. 59

60 Chapter 1: UniData SQL commands Nested UNNEST Association no option In this example, the association LINE_ITEMS is unnested. This unnests all associated multivalues and multi-subvalues; therefore, for each multi-subvalue, the singlevalued attributes are repeated, as is the (associated) multivalue, PRODUCT_NO. UNNEST NL1 association In this example, the UNNEST keyword is used with option NL1, and the association LINE_ITEMS is listed in the UNNEST clause. This unnests the associated multivalue, PRODUCT_NO; therefore, for each multivalue, all singlevalued attributes are repeated. 60

61 Unnesting UNNEST NL2 association In this example, the UNNEST keyword is used with option NL2, and the association LINE_ITEMS is listed in the UNNEST clause. This unnests associated multi-subvalues only; therefore, for each multisubvalue, the associated multivalue, PRODUCT_NO, is repeated. UNNEST NL_ALL association In this example, the UNNEST keyword is used with option NL_ALL, and the association LINE_ITEMS is listed in the UNNEST clause. This unnests all associated multivalues and multi-subvalues; therefore, for each multi-subvalue, the singlevalued attributes are repeated, as is the (associated) multivalue, PRODUCT_NO. Note: This syntax has the same effect as UNNEST with no option and UNNEST NL_ALL association. 61

62 Chapter 1: UniData SQL commands UNNEST NL1 associated multivalued, multi-subvalued attributes In this example, the UNNEST keyword is used with option NL1; and the associated attributes PRODUCT_NO (multivalued) and PRICE (multi-subvalued) are listed in the UNNEST clause. The NL1 keyword limits unnesting to the associated multivalue (PRODUCT_NO); therefore, for each multivalue, all singlevalued attributes are repeated. This syntax has the same effect as UNNEST NL1 association. UNNEST NL2 Associated Multivalued, Multi-Subvalued Attributes In this example, the UNNEST keyword is used with option NL2; and the associated attributes PRODUCT_NO (multivalued) and PRICE (multi-subvalued) are listed in the UNNEST clause. Option NL2 limits the unnesting to the associated multi-subvalue, PRODUCT_NO; therefore, for each multisubvalue, the multivalue is repeated. Note: This syntax has the same effect as UNNEST NL2 association. 62

63 SET UNNEST NL_ALL associated multivalued attribute In this example, the UNNEST keyword is used with option NL2; and the associated attributes PRODUCT_NO (multivalued) and PRICE (multi-subvalued) are listed in the UNNEST clause. This unnests all associated multivalues and multi-subvalues; therefore, for each multi-subvalue, the singlevalued attributes are repeated, as is the (associated) multivalue, PRODUCT_NO. Note: This syntax has the same effect as UNNEST with no option and UNNEST NL_ALL association. SET The SET statement sets a system variable s value. UniData SQL system variables affect the way query results or reports are displayed. You may use the SET statement to override the system defaults or to restore them later. Syntax SET {HEADING {OFF ON} LINESIZE n MARGIN n 63

64 Chapter 1: UniData SQL commands MISSING {NULL string } NEWPAGE n NULL text PAGESIZE n PAUSE {ON OFF} SPACE n WRAP {VERT HORI DEF} UNDERLINE{ char OFF ON} DISPLAY TPMESSAGE {ON OFF} TRANSACTION {READ ONLY READ WRITE ISOLATION LEVEL { READ UNCOMMITTED READ COMMITTED REPEATABLE READ SERIALIZABLE} Parameters The following table describes each parameter of the syntax. Parameter Description HEADING ON Enables or suppresses printing of column headings in reports. The default is ON. HEADING OFF LINESIZE n Sets the width of the report line. The default is 80. MARGIN n Sets the left margin of the display or report and allows you to align the display. The default is 1. MISSING {NULL string } With MISSING NULL set, and null value handling on, missing values are treated as nulls; with any other string set, missing values are NOT treated as nulls, and the string represents missing values in display. This setting makes UniData SQL operate the same way as desktop tools, which access UniData SQL through ODBC. For further information on UniData null value handling, see Using UniData. NULL_FLAG =1 in udtconfig turns on null value handling. NEWPAGE n Sets a number of blank lines to be printed between the bottom title of each page and the top title of the next page. If n is 0, UniData SQL issues a form feed between pages. The default is 1. NULL text Sets the text to represent the null value in display. PAGESIZE n Sets the number of lines per page for display of the results of query_spec or SELECT statements. The default is 23. This option remains in effect if you return to UniData when you exit UniData SQL. PAUSE ON OFF In interactive mode, when PAUSE is ON, display stops at the end of each page and displays the prompt Enter <New line> to continue... The next page displays when the user presses ENTER. The default in interactive mode is ON; PAUSE ON has no effect in UniData SQL scripts. SPACE Sets the number of spaces between the columns in a report. The default is 1. WRAP Determines how UniData SQL displays columns in results of query_spec or SELECT statements: VERT Displays each column on a new line; column headings and column values may wrap on several lines. HORI Displays columns across the line, wrapping when LINESIZE is exceeded. DEF Follows UniData conventions: when a whole row fits on one line, UniData SQL displays it horizontally; when it does not, UniData SQL displays it vertically. For examples of the different WRAP types, see the examples below. 64

65 SET Parameter Description UNDERLINE Sets the character used to underline headings. Standard characters are '-' and '='. charon OFF DISPLAY TPMESSAGE ON OFF DISPLAY TPMESSAGE ON turns on the display of notification messages for transaction processing (TP) commands. UniData SQL always displays Transaction aborted when a transaction is rolled back, regardless of the TPMESSAGE setting. DISPLAY TPMESSAGE ON traces transaction processing (TP) commands. The Recoverable File System (RFS) must be in use for transaction processing to work. In the absence of RFS, TP commands are ignored. TRANSACTION READ ONLY READ WRITE ISOLATION LEVEL Specifies the access mode and isolation level of the next transaction. Does not start a new transaction, and cannot be executed within an active transaction. Default settings are restored upon completion of the transaction. The combination of isolation level and access mode determines the access mode and file or record locks set. READ ONLY The next transaction is read-only. READ WRITE Default. The next transaction is read-write. ISOLATION LEVEL For further information, see the following table in the next section. Choose from: READ UNCOMMITTED READ COMMITTED (the default) REPEATABLE READ SERIALIZABLE You can set the level of isolation for your environment by setting the UniData environment variable DEFAULT_ISO_LEVEL. For further information on transaction processing and isolation levels, see Using UniData SQL. Isolation levels Your selection of isolation level may affect the access mode and locks set for the next transaction. Level Access mode Locks READ UNCOMMITTED Read only None READ COMMITTED Choose readonly or read/write access; defaults to read/write. UPDATE, INSERT DELETE exclusive record locks (regardless of isolation level) REPEATABLE READ Choose readonly or read/write access; defaults to read/write. SELECT shared record locks UPDATE, INSERT, DELETE exclusive record locks (regardless of isolation level) 65

66 Chapter 1: UniData SQL commands Level Access mode Locks SERIALIZABLE Choose readonly or read/write access; defaults to read/write. If the target is supplied Shared locks on records being read, and exclusive locks on records being updated. If the target is not supplied File-level shared locks on tables being read, or a record-level exclusive lock on records being updated. Examples The following example demonstrates the PAGESIZE clause to set the display page to 10 lines, and the LINESIZE clause to establish a 40-character-wide display area. Report headers and footers are included to show where pages begin and end. sql> sql> sql> sql> sql> sql> sql> SET PAGESIZE 10; SET LINESIZE 40; TTITLE "Page TOP Title"; BTITLE "Page BOTTOM Title"; TTITLE ON; BTITLE ON; SELECT ID FROM ORDERS; The following example shows output from the above commands: The next set of examples demonstrates the SET DISPLAY TPMESSAGE ON command, which turns on the display of transaction processing (TP) commands. Note: The Recoverable File System (RFS) must be in use for transaction processing to work. In the absence of RFS, TP commands are ignored. This example demonstrates turning on display of transaction start and transaction commit messages: sql> SET DISPLAY TPMESSAGE ON; After the preceding SET DISPLAY TPMESSAGE ON statement is executed, any statement that creates, updates, or deletes a table generates Transaction started and Transaction committed messages, as in the following example: 66

67 SET The transaction in the following example is set to read-only with an isolation level of READ UNCOMMITTED. Therefore, the attempt to add a value is not allowed. The SELECT statement displays the record to show that the new value was not added. The following example demonstrates the HORI and DEF settings for WRAP. HORI forces UniData SQL to print column text horizontally, wrapping when LINESIZE is exceeded; DEF switches the display to vertical because the report line does not fit on one line. 67

68 Chapter 1: UniData SQL commands The following series of examples demonstrates the effects of SET MISSING NULL, which causes UniData SQL to mimic ODBC s handling of empty strings, by converting them to the null value. Note: NULL_FLAG in udtconfig must be ON for SET MISSING to take effect. This first statement converts PRICE to empty strings in product 10010: sql> UPDATE ORDERS SET PRICE = "" WHERE PRODUCT_NO = 10010; 4 record(s) updated. This example computes the average of PRICE for products and Values in the PRICE attribute for product are empty strings, and are therefore included in the computation: 68

69 SET Next, we execute SET MISSING NULL to have empty strings handled as nulls. Then we execute the same computation. This time, values in the PRICE attribute for product are not included in computation of average, because null values are ignored by aggregate functions. Finally, we reset MISSING = to return to normal processing of empty strings: 69

70 Chapter 1: UniData SQL commands SHOW The SHOW statement displays the values of UniData SQL system variables. Syntax SHOW {ALL BTITLE TTITLE set_option} Parameters The following table describes each parameter of the syntax. 70 Parameter Description ALL Displays the settings of all SHOW options. BTITLE Displays the BTITLE definition TTITLE Displays the TTITLE definition.

71 SHOW Parameter Description set_option Displays the current setting of any SET option listed below. See SET for descriptions of the following options: HEADING HEADSEP LINESIZE MARGIN NEWPAGE NULL PAGESIZE PAUSE SPACE WRAP UNDERLINE Examples The following example displays the current setting of the PAGESIZE parameter, which is defined by the SET command: sql> SHOW PAGESIZE; Page size is 66 The next example uses the SHOW ALL command to display the default settings for the environment variables set by the SET command: sql> SHOW ALL; HEADSEP is ' ' UNDERLINE is '-' Line size is 80 Newpage is 0 Null is Number format is Number width is 10 Page size is 23 Left margin is 0 Pause text is Enter <New line> to continue... Space is 1 Heading is ON Underline is ON Pause is ON Report is in default form Sample is OFF. Head seperate character is on Header no supress The final example uses the SET command to assign the letter N to represent the null value in display and print: sql> SET NULL N ; sql> SHOW NULL; 71

72 Chapter 1: UniData SQL commands Null text is N SQL The ECL command sql initiates an interactive UniData SQL session. You can execute this command from the operating system level or from udt. Note: For instructions on exiting from an interactive UniData SQL session, see EXIT and QUIT. Syntax sql TTITLE TTITLE establishes a header for printed and displayed reports. You can specify any number of constants and variables. These parameters are executed in the order in which you define them. You can apply any number of TTITLE commands to one or more attributes. If more than one TTITLE command is applied to the same attribute, the last command supersedes all previous commands. Note: Execute the SHOW TTITLE command to display the current setting of TTITLE. Syntax TTITLE [ text ] TTITLE [ print_clause OFF ON] print_clause syntax: {SKIP [n] [COL [n] [ LEFT CENTER RIGHT] } [ text ] [FORMAT format [TAB [n] ] [new_val] ]... Parameters The following table describes each parameter of the syntax. 72

73 TTITLE Option Description "text" Displays a two-line header. The first line contains the date at the left and the page number on the right; the second line contains the center-aligned text. You can include any number of the following heading options enclosed in single quotation marks: C[n] Centers heading or footing text within a line of n width. D Inserts the current system date. L Inserts a blank line. N Suppresses the default prompt, Enter new line to continue..., which appears at the bottom of each screen page. Pages scroll without stopping until the report is finished. (The prompt displays only in interactive mode.) P or S Inserts the current page number. T Inserts the time and date when report generation began. print_clause print_clause has the following syntax: {COL n SKIP [n] [LEFT CENTER RIGHT]...} [FORMAT format] {variable "text"}] [TAB [n] {variable "text"}...] For descriptions of print_clause parameters, see the next table. OFF ON Turns the header off or on without affecting the heading text. The default is OFF. no parameter Displays TTITLE current settings. SHOW TTITLE also displays current settings. print_clause parameters The following table describes each parameter of print_clause: Clause Description COL n Skips to the nth column of the current line (see LINESIZE option of SET command). The space is required. SKIP n Skips n lines before printing out the text. The default is 1. You must include a space after the keyword SKIP. LEFT, CENTER, RIGHT Aligns the title data on the current line. The following data item (variable or text) is aligned as a group to the end of the statement, or to the next LEFT, CENTER, or RIGHT, or to the next COL, SKIP, or TAB. CENTER and RIGHT are calculated based on the LINESIZE option of the SET statement. FORMAT format new_val Specifies a format model for the following data item. FORMAT is effective until the end of the statement or until another FORMAT clause is encountered in the same statement. format options are discussed following this table. Displays the current value of the variable new_val, set by NEW_VALUE in a previously executed COLUMN statement. 73

74 Chapter 1: UniData SQL commands Clause Description "text" Displays a two-line header. The first line contains the date on the left and the page number on the right; the second line contains the center-aligned text. In addition to literal text, you can include any number of the following heading options: C[n] Centers heading text within a line of n width. D Inserts the current system date in the heading. L Executes a new line. N Suppresses the default prompt, Enter new line to continue..., which appears at the bottom of each screen page. Pages scroll without stopping until the report is finished. P or S Inserts the current page number. T Inserts the time and date when report generation began. TAB n Skips n columns from the current position. The space is optional. format options format specifies the display format for values in the header. format must be enclosed in quotation marks, and can be one of the following: 74 Character Format Options The format for a character string is An where n is the column width. The default is the length specified in the dictionary definition of the attribute. Date Format Options You may not specify format options for date attributes; the formatting specified in the dictionary definition of the attribute is used. Numeric Format Options Use the options in the following table to build a display mask for formatting numeric values. Option Explanation Example 9 Determines number of digits displayed Display leading zeros $ Prefix displayed value with a dollar sign. $9999 B Print leading zeros as blank. B999 MI Display minus sign (-) after a negative 9999MI value. PR Display a negative value in angle brackets 9999PR. Align on the decimal point , Insert a comma every three digits. 99,999 V Multiply the value by the n power of 10, where n is the number of 9s after V. 999V99 EEEE Display the scientific notation (the format must contain four Es). 9.99EEEE

75 TTITLE Note: If the format is not applicable to the data type of a particular data item, FORMAT has no effect on that item, and the default format is used. The format specified in the FORMAT clause is the same as described in the COLUMN statement. For further information, see COLUMN. Examples The following example defines a centered title of Open Orders. The SELECT statement displays the title. The next example uses the variables old and new, that are set by the COLUMN command. These variables, added to TTITLE and BTITLE, include in the header and footer current and old values in the CLIENT_NO attribute: 75

76 Chapter 1: UniData SQL commands UPDATE The UPDATE statement changes values stored in one or more attributes of a table. 76

77 UPDATE You cannot with the UPDATE command. To you must delete and reinsert the record. For further information, see the DELETE and INSERT commands in this manual. Warning: If two subtables map to the same association, but specify different primary keys, UniData SQL has no way of ensuring that primary keys are unique. This could result in duplicate values being added through UPDATE or INSERT, or by more than one row being updated by UPDATE. An UPDATE statement with no WHERE clause updates all rows in the table. Syntax UPDATE table_spec [ID_list] {SET ADD VALUE ADD SUBVALUE} attribute_name = expression [,attribute_name = expression...] [WHERE search_condition] Parameters The following table describes each parameter of the syntax. Parameter Description table_spec Name of the table, view, or subtable to be updated. ID_list Limits update to only those records whose ID is listed in ID_list. ID_list may be applied to a base table only, not to a view or subtable. SET Replaces the values in one or more attributes of records satisfying WHERE search_condition. You may not include delimiters to set multivalues or multisubvalues. ADD VALUE Appends values to the end of an existing multivalued or multi-subvalued attribute specified by attribute_name for the rows satisfying the WHERE clause. More information is provided on this subject following this table, as well as in Using UniData. ADD SUBVALUE attribute_name Specifies an attribute to update. May be an individual attribute name; may be qualified by preceding the attribute name with the table name/label and a period, as follows: table_name.attribute_name table_label.attribute_name expression Any combination of attribute names, constants, arithmetic operators, and UniData SQL functions that together return a value that determines the value to store in the attribute. You may set an attribute to the null value with an expression like this: attribute_name = NULL. 77

78 Chapter 1: UniData SQL commands Parameter Description WHERE search_condition Updates attribute values that meet the criteria specified in search_condition. WHERE evaluates multivalues and multi-subvalues as if they have been unnested. search_condition takes the form: attribute_name/expression rel_op attribute_name/ expression For example: WHERE fld1 BETWEEN 100 AND 500. rel_op may also be a Boolean operator (AND, OR). If no WHERE clause or ID list is included, ALL rows of the table are updated. Within a WHERE clause, the sum total of the individual conditions and the Boolean operators cannot exceed 127. For information on writing WHERE clauses, see Using UniData. Adding multivalues and multi-subvalues To add multivalues or multi-subvalues to an attribute, use an ADD VALUE or ADD SUBVALUE clause. These clauses insert the value or subvalue into a record as follows: ADD VALUE appends the value to the end of a multivalued or multi-subvalued attribute, after satisfying the conditions specified by the WHERE clause. Separate multivalues with value marks ( } ), and multi-subvalues with subvalue marks ( ). ADD SUBVALUE appends the subvalue to the end of the group of multi-subvalues after satisfying the conditions specified by the WHERE clause. A multivalued constant cannot contain the right brace (}) as data. UniData SQL interprets this as a value mark. You cannot include value marks in a string constant with the ADD SUBVALUE keywords. Use ADD VALUE to add multivalues, and ADD SUBVALUE to add multi-subvalues. Null value handling Remember the following points when using the keyword NULL: You cannot use INSERT or UPDATE command to add the null value, along with other values, into a multivalued or multi-subvalued attribute. This is because UniData SQL cannot recognize the keyword NULL embedded in a quoted string such as D NULL I. You must first create the record, then use the UPDATE command to change existing values to null, or to append null values. With null value handling turned off, the keyword NULL inserts an empty string. The null value is not valid Examples The following example updates the address for CLIENTS record 9982: 78

79 Examples The next example adds two new multivalues for PHONE_NUM and PHONE_TYPE. First, we display the record to be updated. Then, we add the new multivalues and display the record again. 79

Rocket UniData. Using UniData SQL. Version 8.1.0. February 2015 UDT-810-SQLU-1

Rocket UniData. Using UniData SQL. Version 8.1.0. February 2015 UDT-810-SQLU-1 Rocket UniData Using UniData SQL Version 8.1.0 February 2015 UDT-810-SQLU-1 Notices Edition Publication date: February 2015 Book number: UDT-810-SQLU-7 Product version: Rocket UniData 8.1.0 Copyright Rocket

More information

REPORT GENERATION USING SQL*PLUS COMMANDS

REPORT GENERATION USING SQL*PLUS COMMANDS Oracle For Beginners Page : 1 Chapter 14 REPORT GENERATION USING SQL*PLUS COMMANDS What is a report? Sample report Report script Break command Compute command Column command Ttitle and Btitle commands

More information

KB_SQL SQL Reference Guide Version 4

KB_SQL SQL Reference Guide Version 4 KB_SQL SQL Reference Guide Version 4 1995, 1999 by KB Systems, Inc. All rights reserved. KB Systems, Inc., Herndon, Virginia, USA. Printed in the United States of America. No part of this manual may be

More information

Retrieving Data Using the SQL SELECT Statement. Copyright 2006, Oracle. All rights reserved.

Retrieving Data Using the SQL SELECT Statement. Copyright 2006, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement

More information

Database Programming with PL/SQL: Learning Objectives

Database Programming with PL/SQL: Learning Objectives Database Programming with PL/SQL: Learning Objectives This course covers PL/SQL, a procedural language extension to SQL. Through an innovative project-based approach, students learn procedural logic constructs

More information

ACCELL/SQL: Creating Reports with RPT Report Writer

ACCELL/SQL: Creating Reports with RPT Report Writer ACCELL/SQL: Creating Reports with RPT Report Writer 2 3 4 5 6 7 8 This manual, Creating Reports With RPT Report Writer, tells you how to develop an application report using Report Writer and gives complete

More information

Producing Readable Output with SQL*Plus

Producing Readable Output with SQL*Plus Producing Readable Output with SQL*Plus Chapter 8 Objectives After completing this lesson, you should be able to do the following: Produce queries that require an input variable Customize the SQL*Plus

More information

Oracle Database 10g: Introduction to SQL

Oracle Database 10g: Introduction to SQL Oracle University Contact Us: 1.800.529.0165 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database technology.

More information

Sage Abra SQL HRMS Reports. User Guide

Sage Abra SQL HRMS Reports. User Guide Sage Abra SQL HRMS Reports User Guide 2010 Sage Software, Inc. All rights reserved. Sage, the Sage logos, and the Sage product and service names mentioned herein are registered trademarks or trademarks

More information

Instant SQL Programming

Instant SQL Programming Instant SQL Programming Joe Celko Wrox Press Ltd. INSTANT Table of Contents Introduction 1 What Can SQL Do for Me? 2 Who Should Use This Book? 2 How To Use This Book 3 What You Should Know 3 Conventions

More information

Introduction to Microsoft Jet SQL

Introduction to Microsoft Jet SQL Introduction to Microsoft Jet SQL Microsoft Jet SQL is a relational database language based on the SQL 1989 standard of the American Standards Institute (ANSI). Microsoft Jet SQL contains two kinds of

More information

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY

CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY CHAPTER 2 DATABASE MANAGEMENT SYSTEM AND SECURITY 2.1 Introduction In this chapter, I am going to introduce Database Management Systems (DBMS) and the Structured Query Language (SQL), its syntax and usage.

More information

Data Tool Platform SQL Development Tools

Data Tool Platform SQL Development Tools Data Tool Platform SQL Development Tools ekapner Contents Setting SQL Development Preferences...5 Execution Plan View Options Preferences...5 General Preferences...5 Label Decorations Preferences...6

More information

Oracle SQL. Course Summary. Duration. Objectives

Oracle SQL. Course Summary. Duration. Objectives Oracle SQL Course Summary Identify the major structural components of the Oracle Database 11g Create reports of aggregated data Write SELECT statements that include queries Retrieve row and column data

More information

3.GETTING STARTED WITH ORACLE8i

3.GETTING STARTED WITH ORACLE8i Oracle For Beginners Page : 1 3.GETTING STARTED WITH ORACLE8i Creating a table Datatypes Displaying table definition using DESCRIBE Inserting rows into a table Selecting rows from a table Editing SQL buffer

More information

9.1 SAS. SQL Query Window. User s Guide

9.1 SAS. SQL Query Window. User s Guide SAS 9.1 SQL Query Window User s Guide The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2004. SAS 9.1 SQL Query Window User s Guide. Cary, NC: SAS Institute Inc. SAS

More information

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals Oracle University Contact Us: +966 12 739 894 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training is designed to

More information

Parameter Fields and Prompts. chapter

Parameter Fields and Prompts. chapter Parameter Fields and Prompts chapter 23 Parameter Fields and Prompts Parameter and prompt overview Parameter and prompt overview Parameters are Crystal Reports fields that you can use in a Crystal Reports

More information

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals Oracle University Contact Us: 1.800.529.0165 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This course is designed to deliver the fundamentals of SQL and PL/SQL along

More information

DBF Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 7

DBF Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 7 97 CHAPTER 7 DBF Chapter Note to UNIX and OS/390 Users 97 Import/Export Facility 97 Understanding DBF Essentials 98 DBF Files 98 DBF File Naming Conventions 99 DBF File Data Types 99 ACCESS Procedure Data

More information

Using This Reference Manual Chapter 1 to Issue ACL Commands

Using This Reference Manual Chapter 1 to Issue ACL Commands Copyright 1998 ACL Services Ltd. All rights reserved No part of this manual may be reproduced or transmitted in any form by any means, electronic or mechanical, including photocopying and recording, information

More information

Q&As: Microsoft Excel 2013: Chapter 2

Q&As: Microsoft Excel 2013: Chapter 2 Q&As: Microsoft Excel 2013: Chapter 2 In Step 5, why did the date that was entered change from 4/5/10 to 4/5/2010? When Excel recognizes that you entered a date in mm/dd/yy format, it automatically formats

More information

Oracle 10g PL/SQL Training

Oracle 10g PL/SQL Training Oracle 10g PL/SQL Training Course Number: ORCL PS01 Length: 3 Day(s) Certification Exam This course will help you prepare for the following exams: 1Z0 042 1Z0 043 Course Overview PL/SQL is Oracle's Procedural

More information

Microsoft Dynamics GP. SmartList Builder User s Guide With Excel Report Builder

Microsoft Dynamics GP. SmartList Builder User s Guide With Excel Report Builder Microsoft Dynamics GP SmartList Builder User s Guide With Excel Report Builder Copyright Copyright 2008 Microsoft Corporation. All rights reserved. Complying with all applicable copyright laws is the responsibility

More information

T-SQL STANDARD ELEMENTS

T-SQL STANDARD ELEMENTS T-SQL STANDARD ELEMENTS SLIDE Overview Types of commands and statement elements Basic SELECT statements Categories of T-SQL statements Data Manipulation Language (DML*) Statements for querying and modifying

More information

Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff

Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff D80198GC10 Oracle Database 12c SQL and Fundamentals Summary Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff Level Professional Delivery Method Instructor-led

More information

Generating SQL Plus Reports

Generating SQL Plus Reports Generating SQL Plus Reports Report Writing a science?? Even though report writing is a small effort it is still a project. Why? Must be thought out Easy to understand Simple to read Provides possible insight

More information

Microsoft Excel 2010 Tutorial

Microsoft Excel 2010 Tutorial 1 Microsoft Excel 2010 Tutorial Excel is a spreadsheet program in the Microsoft Office system. You can use Excel to create and format workbooks (a collection of spreadsheets) in order to analyze data and

More information

3. Add and delete a cover page...7 Add a cover page... 7 Delete a cover page... 7

3. Add and delete a cover page...7 Add a cover page... 7 Delete a cover page... 7 Microsoft Word: Advanced Features for Publication, Collaboration, and Instruction For your MAC (Word 2011) Presented by: Karen Gray (kagray@vt.edu) Word Help: http://mac2.microsoft.com/help/office/14/en-

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle University Contact Us: + 38516306373 Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle University Contact Us: 001-855-844-3881 & 001-800-514-06-97 Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals

More information

Setting Up ALERE with Client/Server Data

Setting Up ALERE with Client/Server Data Setting Up ALERE with Client/Server Data TIW Technology, Inc. November 2014 ALERE is a registered trademark of TIW Technology, Inc. The following are registered trademarks or trademarks: FoxPro, SQL Server,

More information

Managing Objects with Data Dictionary Views. Copyright 2006, Oracle. All rights reserved.

Managing Objects with Data Dictionary Views. Copyright 2006, Oracle. All rights reserved. Managing Objects with Data Dictionary Views Objectives After completing this lesson, you should be able to do the following: Use the data dictionary views to research data on your objects Query various

More information

Rocket UniVerse. External Database Access (EDA) Version 11.2.5. July2015 UNV-1125-EDA-1

Rocket UniVerse. External Database Access (EDA) Version 11.2.5. July2015 UNV-1125-EDA-1 Rocket UniVerse External Database Access (EDA) Version 11.2.5 July2015 UNV-1125-EDA-1 Notices Edition Publication date: July2015 Book number: UNV-1125-EDA-1 Product version: Rocket UniVerse V11.2.5 Copyright

More information

D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to:

D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to: D61830GC30 for Developers Summary Duration Vendor Audience 5 Days Oracle Database Administrators, Developers, Web Administrators Level Technology Professional Oracle 5.6 Delivery Method Instructor-led

More information

5. CHANGING STRUCTURE AND DATA

5. CHANGING STRUCTURE AND DATA Oracle For Beginners Page : 1 5. CHANGING STRUCTURE AND DATA Altering the structure of a table Dropping a table Manipulating data Transaction Locking Read Consistency Summary Exercises Altering the structure

More information

Oracle Database 12c: Introduction to SQL Ed 1.1

Oracle Database 12c: Introduction to SQL Ed 1.1 Oracle University Contact Us: 1.800.529.0165 Oracle Database 12c: Introduction to SQL Ed 1.1 Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training helps you write subqueries,

More information

NorthClark Computing, Inc. Bill of Material and Parts Master Maintenance. Administrator s Guide

NorthClark Computing, Inc. Bill of Material and Parts Master Maintenance. Administrator s Guide ERP Consulting Web Development Custom Programming Solutions Desktop & Web Applications for Manfact NorthClark Computing, Inc. Bill of Material and Parts Master Maintenance Administrator s Guide Web and

More information

Choosing a Data Model for Your Database

Choosing a Data Model for Your Database In This Chapter This chapter describes several issues that a database administrator (DBA) must understand to effectively plan for a database. It discusses the following topics: Choosing a data model for

More information

Import Filter Editor User s Guide

Import Filter Editor User s Guide Reference Manager Windows Version Import Filter Editor User s Guide April 7, 1999 Research Information Systems COPYRIGHT NOTICE This software product and accompanying documentation is copyrighted and all

More information

Database Query 1: SQL Basics

Database Query 1: SQL Basics Database Query 1: SQL Basics CIS 3730 Designing and Managing Data J.G. Zheng Fall 2010 1 Overview Using Structured Query Language (SQL) to get the data you want from relational databases Learning basic

More information

Title. Syntax. stata.com. odbc Load, write, or view data from ODBC sources. List ODBC sources to which Stata can connect odbc list

Title. Syntax. stata.com. odbc Load, write, or view data from ODBC sources. List ODBC sources to which Stata can connect odbc list Title stata.com odbc Load, write, or view data from ODBC sources Syntax Menu Description Options Remarks and examples Also see Syntax List ODBC sources to which Stata can connect odbc list Retrieve available

More information

Toad for Data Analysts, Tips n Tricks

Toad for Data Analysts, Tips n Tricks Toad for Data Analysts, Tips n Tricks or Things Everyone Should Know about TDA Just what is Toad for Data Analysts? Toad is a brand at Quest. We have several tools that have been built explicitly for developers

More information

Resources You can find more resources for Sync & Save at our support site: http://www.doforms.com/support.

Resources You can find more resources for Sync & Save at our support site: http://www.doforms.com/support. Sync & Save Introduction Sync & Save allows you to connect the DoForms service (www.doforms.com) with your accounting or management software. If your system can import a comma delimited, tab delimited

More information

Netezza SQL Class Outline

Netezza SQL Class Outline Netezza SQL Class Outline CoffingDW education has been customized for every customer for the past 20 years. Our classes can be taught either on site or remotely via the internet. Education Contact: John

More information

Kaseya 2. Quick Start Guide. for VSA 6.3

Kaseya 2. Quick Start Guide. for VSA 6.3 Kaseya 2 Custom Reports Quick Start Guide for VSA 6.3 December 9, 2013 Agreement The purchase and use of all Software and Services is subject to the Agreement as defined in Kaseya s Click-Accept EULA as

More information

Microsoft Dynamics GP. Extender User s Guide

Microsoft Dynamics GP. Extender User s Guide Microsoft Dynamics GP Extender User s Guide Copyright Copyright 2010 Microsoft. All rights reserved. Limitation of liability This document is provided as-is. Information and views expressed in this document,

More information

Eventia Log Parsing Editor 1.0 Administration Guide

Eventia Log Parsing Editor 1.0 Administration Guide Eventia Log Parsing Editor 1.0 Administration Guide Revised: November 28, 2007 In This Document Overview page 2 Installation and Supported Platforms page 4 Menus and Main Window page 5 Creating Parsing

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

Web Intelligence User Guide

Web Intelligence User Guide Web Intelligence User Guide Office of Financial Management - Enterprise Reporting Services 4/11/2011 Table of Contents Chapter 1 - Overview... 1 Purpose... 1 Chapter 2 Logon Procedure... 3 Web Intelligence

More information

SES Project v 9.0 SES/CAESAR QUERY TOOL. Running and Editing Queries. PS Query

SES Project v 9.0 SES/CAESAR QUERY TOOL. Running and Editing Queries. PS Query SES Project v 9.0 SES/CAESAR QUERY TOOL Running and Editing Queries PS Query Table Of Contents I - Introduction to Query:... 3 PeopleSoft Query Overview:... 3 Query Terminology:... 3 Navigation to Query

More information

Database Migration from MySQL to RDM Server

Database Migration from MySQL to RDM Server MIGRATION GUIDE Database Migration from MySQL to RDM Server A Birdstep Technology, Inc. Raima Embedded Database Division Migration Guide Published: May, 2009 Author: Daigoro F. Toyama Senior Software Engineer

More information

Programming with SQL

Programming with SQL Unit 43: Programming with SQL Learning Outcomes A candidate following a programme of learning leading to this unit will be able to: Create queries to retrieve information from relational databases using

More information

Access Queries (Office 2003)

Access Queries (Office 2003) Access Queries (Office 2003) Technical Support Services Office of Information Technology, West Virginia University OIT Help Desk 293-4444 x 1 oit.wvu.edu/support/training/classmat/db/ Instructor: Kathy

More information

SQL - QUICK GUIDE. Allows users to access data in relational database management systems.

SQL - QUICK GUIDE. Allows users to access data in relational database management systems. http://www.tutorialspoint.com/sql/sql-quick-guide.htm SQL - QUICK GUIDE Copyright tutorialspoint.com What is SQL? SQL is Structured Query Language, which is a computer language for storing, manipulating

More information

Jet Data Manager 2012 User Guide

Jet Data Manager 2012 User Guide Jet Data Manager 2012 User Guide Welcome This documentation provides descriptions of the concepts and features of the Jet Data Manager and how to use with them. With the Jet Data Manager you can transform

More information

ISQL Reference Manual

ISQL Reference Manual ISQL Reference Manual November 2004 Version 90 This manual provides reference material for the ISQL interactive tool provided in the Dharma SDK It also includes a tutorial describing how to use the ISQL

More information

Qlik REST Connector Installation and User Guide

Qlik REST Connector Installation and User Guide Qlik REST Connector Installation and User Guide Qlik REST Connector Version 1.0 Newton, Massachusetts, November 2015 Authored by QlikTech International AB Copyright QlikTech International AB 2015, All

More information

TIBCO Spotfire Metrics Modeler User s Guide. Software Release 6.0 November 2013

TIBCO Spotfire Metrics Modeler User s Guide. Software Release 6.0 November 2013 TIBCO Spotfire Metrics Modeler User s Guide Software Release 6.0 November 2013 Important Information SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR BUNDLED TIBCO SOFTWARE

More information

SQL Server An Overview

SQL Server An Overview SQL Server An Overview SQL Server Microsoft SQL Server is designed to work effectively in a number of environments: As a two-tier or multi-tier client/server database system As a desktop database system

More information

Exploring Microsoft Office Access 2007. Chapter 2: Relational Databases and Multi-Table Queries

Exploring Microsoft Office Access 2007. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office Access 2007 Chapter 2: Relational Databases and Multi-Table Queries 1 Objectives Design data Create tables Understand table relationships Share data with Excel Establish table

More information

TheFinancialEdge. Configuration Guide for General Ledger

TheFinancialEdge. Configuration Guide for General Ledger TheFinancialEdge Configuration Guide for General Ledger 071012 2012 Blackbaud, Inc. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means, electronic,

More information

Sample- for evaluation purposes only. Advanced Crystal Reports. TeachUcomp, Inc.

Sample- for evaluation purposes only. Advanced Crystal Reports. TeachUcomp, Inc. A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc. 2011 Advanced Crystal Reports TeachUcomp, Inc. it s all about you Copyright: Copyright 2011 by TeachUcomp, Inc. All rights reserved.

More information

Basic Excel Handbook

Basic Excel Handbook 2 5 2 7 1 1 0 4 3 9 8 1 Basic Excel Handbook Version 3.6 May 6, 2008 Contents Contents... 1 Part I: Background Information...3 About This Handbook... 4 Excel Terminology... 5 Excel Terminology (cont.)...

More information

Data Integrator. Pervasive Software, Inc. 12365-B Riata Trace Parkway Austin, Texas 78727 USA

Data Integrator. Pervasive Software, Inc. 12365-B Riata Trace Parkway Austin, Texas 78727 USA Data Integrator Event Management Guide Pervasive Software, Inc. 12365-B Riata Trace Parkway Austin, Texas 78727 USA Telephone: 888.296.5969 or 512.231.6000 Fax: 512.231.6010 Email: info@pervasiveintegration.com

More information

Structured Query Language (SQL)

Structured Query Language (SQL) Objectives of SQL Structured Query Language (SQL) o Ideally, database language should allow user to: create the database and relation structures; perform insertion, modification, deletion of data from

More information

How To Understand The Error Codes On A Crystal Reports Print Engine

How To Understand The Error Codes On A Crystal Reports Print Engine Overview Error Codes This document lists all the error codes and the descriptions that the Crystal Reports Print Engine generates. PE_ERR_NOTENOUGHMEMORY (500) There is not enough memory available to complete

More information

Performance Tuning for the Teradata Database

Performance Tuning for the Teradata Database Performance Tuning for the Teradata Database Matthew W Froemsdorf Teradata Partner Engineering and Technical Consulting - i - Document Changes Rev. Date Section Comment 1.0 2010-10-26 All Initial document

More information

4. The Third Stage In Designing A Database Is When We Analyze Our Tables More Closely And Create A Between Tables

4. The Third Stage In Designing A Database Is When We Analyze Our Tables More Closely And Create A Between Tables 1. What Are The Different Views To Display A Table A) Datasheet View B) Design View C) Pivote Table & Pivot Chart View D) All Of Above 2. Which Of The Following Creates A Drop Down List Of Values To Choose

More information

ADP Workforce Now V3.0

ADP Workforce Now V3.0 ADP Workforce Now V3.0 Manual What s New Checks in and Custom ADP Reporting Grids V12 Instructor Handout Manual Guide V10171180230WFN3 V09171280269ADPR12 2011 2012 ADP, Inc. ADP s Trademarks The ADP Logo

More information

Quantum View SM Manage Administration Guide

Quantum View SM Manage Administration Guide Quantum View SM Manage Administration Guide January 2005 Table of Contents Table of Contents Overview.......................................... 3 Introduction.................................... 3 System

More information

Oracle Database 11g SQL

Oracle Database 11g SQL AO3 - Version: 2 19 June 2016 Oracle Database 11g SQL Oracle Database 11g SQL AO3 - Version: 2 3 days Course Description: This course provides the essential SQL skills that allow developers to write queries

More information

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9. Working with Tables in Microsoft Word The purpose of this document is to lead you through the steps of creating, editing and deleting tables and parts of tables. This document follows a tutorial format

More information

Rocket Software Support Handbook

Rocket Software Support Handbook Rocket Software Support Handbook Version 4.0 April 2016 RTS-0400 UG-0 Contents Notices... 4 Corporate information... 5 List of Figures...6 Browser Compatibility...7 Chapter 1: Rocket Technical Support

More information

InterBase 6. Embedded SQL Guide. Borland/INPRISE. 100 Enterprise Way, Scotts Valley, CA 95066 http://www.interbase.com

InterBase 6. Embedded SQL Guide. Borland/INPRISE. 100 Enterprise Way, Scotts Valley, CA 95066 http://www.interbase.com InterBase 6 Embedded SQL Guide Borland/INPRISE 100 Enterprise Way, Scotts Valley, CA 95066 http://www.interbase.com Inprise/Borland may have patents and/or pending patent applications covering subject

More information

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC MyOra 3.0 SQL Tool for Oracle User Guide Jayam Systems, LLC Contents Features... 4 Connecting to the Database... 5 Login... 5 Login History... 6 Connection Indicator... 6 Closing the Connection... 7 SQL

More information

STATGRAPHICS Online. Statistical Analysis and Data Visualization System. Revised 6/21/2012. Copyright 2012 by StatPoint Technologies, Inc.

STATGRAPHICS Online. Statistical Analysis and Data Visualization System. Revised 6/21/2012. Copyright 2012 by StatPoint Technologies, Inc. STATGRAPHICS Online Statistical Analysis and Data Visualization System Revised 6/21/2012 Copyright 2012 by StatPoint Technologies, Inc. All rights reserved. Table of Contents Introduction... 1 Chapter

More information

Business Intelligence Tutorial

Business Intelligence Tutorial IBM DB2 Universal Database Business Intelligence Tutorial Version 7 IBM DB2 Universal Database Business Intelligence Tutorial Version 7 Before using this information and the product it supports, be sure

More information

Version 6.5 Release Notes. Aria Subscription Billing Platform 6.5 Release Notes

Version 6.5 Release Notes. Aria Subscription Billing Platform 6.5 Release Notes Aria Subscription Billing Platform 6.5 Release Notes Version 6.2 Release Notes COPYRIGHT 2013 ARIA SYSTEMS, INC ALL RIGHTS RESERVED Aria Systems, the Aria logo, LiveRelease, DSM, and SmartRec are trademarks

More information

Create a New Database in Access 2010

Create a New Database in Access 2010 Create a New Database in Access 2010 Table of Contents OVERVIEW... 1 CREATING A DATABASE... 1 ADDING TO A DATABASE... 2 CREATE A DATABASE BY USING A TEMPLATE... 2 CREATE A DATABASE WITHOUT USING A TEMPLATE...

More information

Rocket UniData. U2 Data Replication. Version 8.1.0. February 2015 UDT-810-UREP-1

Rocket UniData. U2 Data Replication. Version 8.1.0. February 2015 UDT-810-UREP-1 Rocket UniData U2 Data Replication Version 8.1.0 February 2015 UDT-810-UREP-1 Notices Edition Publication date: February 2015 Book number: UDT-810-UREP-1 Product version: Rocket UniData 8.1.0 Copyright

More information

Microsoft Excel 2010. Understanding the Basics

Microsoft Excel 2010. Understanding the Basics Microsoft Excel 2010 Understanding the Basics Table of Contents Opening Excel 2010 2 Components of Excel 2 The Ribbon 3 o Contextual Tabs 3 o Dialog Box Launcher 4 o Quick Access Toolbar 4 Key Tips 5 The

More information

Teach Yourself InterBase

Teach Yourself InterBase Teach Yourself InterBase This tutorial takes you step-by-step through the process of creating and using a database using the InterBase Windows ISQL dialog. You learn to create data structures that enforce

More information

Oracle Database: Introduction to SQL

Oracle Database: Introduction to SQL Oracle University Contact Us: +381 11 2016811 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn Understanding the basic concepts of relational databases ensure refined code by developers.

More information

2Creating Reports: Basic Techniques. Chapter

2Creating Reports: Basic Techniques. Chapter 2Chapter 2Creating Reports: Chapter Basic Techniques Just as you must first determine the appropriate connection type before accessing your data, you will also want to determine the report type best suited

More information

UNISYS. Business Information Server. MRI Administration and User s Guide. Printed in USA May 2004 7846 0391 013

UNISYS. Business Information Server. MRI Administration and User s Guide. Printed in USA May 2004 7846 0391 013 Business Information Server MRI Administration and User s Guide UNISYS 2004 Unisys Corporation. All rights reserved. Printed in USA May 2004 7846 0391 013 NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THIS

More information

Database 10g Edition: All possible 10g features, either bundled or available at additional cost.

Database 10g Edition: All possible 10g features, either bundled or available at additional cost. Concepts Oracle Corporation offers a wide variety of products. The Oracle Database 10g, the product this exam focuses on, is the centerpiece of the Oracle product set. The "g" in "10g" stands for the Grid

More information

Excel 2007 Basic knowledge

Excel 2007 Basic knowledge Ribbon menu The Ribbon menu system with tabs for various Excel commands. This Ribbon system replaces the traditional menus used with Excel 2003. Above the Ribbon in the upper-left corner is the Microsoft

More information

BCA. Database Management System

BCA. Database Management System BCA IV Sem Database Management System Multiple choice questions 1. A Database Management System (DBMS) is A. Collection of interrelated data B. Collection of programs to access data C. Collection of data

More information

Thoroughbred Basic TM ODBC Client Capability Customization Supplement

Thoroughbred Basic TM ODBC Client Capability Customization Supplement Thoroughbred Basic TM ODBC Client Capability Customization Supplement Version 8.8.0 46 Vreeland Drive, Suite 1 Skillman, NJ 08558-2638 Telephone: 732-560-1377 Outside NJ 800-524-0430 Fax: 732-560-1594

More information

There are numerous ways to access monitors:

There are numerous ways to access monitors: Remote Monitors REMOTE MONITORS... 1 Overview... 1 Accessing Monitors... 1 Creating Monitors... 2 Monitor Wizard Options... 11 Editing the Monitor Configuration... 14 Status... 15 Location... 17 Alerting...

More information

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide Open Crystal Reports From the Windows Start menu choose Programs and then Crystal Reports. Creating a Blank Report Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick

More information

Oracle Database: Introduction to SQL

Oracle Database: Introduction to SQL Oracle University Contact Us: 1.800.529.0165 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn View a newer version of this course This Oracle Database: Introduction to SQL training

More information

Database Administration with MySQL

Database Administration with MySQL Database Administration with MySQL Suitable For: Database administrators and system administrators who need to manage MySQL based services. Prerequisites: Practical knowledge of SQL Some knowledge of relational

More information

Using SQL Queries in Crystal Reports

Using SQL Queries in Crystal Reports PPENDIX Using SQL Queries in Crystal Reports In this appendix Review of SQL Commands PDF 924 n Introduction to SQL PDF 924 PDF 924 ppendix Using SQL Queries in Crystal Reports The SQL Commands feature

More information

Work Order Management. Release 8.7.2

Work Order Management. Release 8.7.2 Work Order Management Release 8.7.2 Legal Notices 2011 Epicor Software Corporation. All rights reserved. Unauthorized reproduction is a violation of applicable laws. Epicor and the Epicor logo are registered

More information

Rocket U2 Web Development Environment

Rocket U2 Web Development Environment Rocket U2 Web Development Environment Web Designer User s Guide Version 5.2.0 July 2015 WDE-520-ALL-UG-01 Notices Edition Publication date: July 2015 Book number: WDE-520-ALL-UG-01 Product version: Version

More information

Microsoft Access 3: Understanding and Creating Queries

Microsoft Access 3: Understanding and Creating Queries Microsoft Access 3: Understanding and Creating Queries In Access Level 2, we learned how to perform basic data retrievals by using Search & Replace functions and Sort & Filter functions. For more complex

More information

IT2305 Database Systems I (Compulsory)

IT2305 Database Systems I (Compulsory) Database Systems I (Compulsory) INTRODUCTION This is one of the 4 modules designed for Semester 2 of Bachelor of Information Technology Degree program. CREDITS: 04 LEARNING OUTCOMES On completion of this

More information

Rocket U2 Web Development Environment

Rocket U2 Web Development Environment Rocket U2 Web Development Environment Web Designer User s Guide Version 5.2. October 205 WDE-52-ALL-UG-0 Notices Edition Publication date: October 205 Book number: WDE-52-ALL-UG-0 Product version: Version

More information