Page 3 - FairCom Corporation i; Table of Contents; Documentation Overview
FairCom Corporation i Table of Contents Documentation Overview Purpose of This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vAudience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
Page 4 - Data Load Utility: dbload
ii FairCom Corporation 3.5 The HELP and TABLE Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-113.6 Transaction Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-113.7 ISQL Reference . . . . ...
Page 5 - FairCom Corporation iii; Schema Export Utility: dbschema
FairCom Corporation iii 5.4 Data File Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-25.5 The Commands File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 5.5.1 The...
Page 7 - FairCom Corporation; PURPOSE OF THIS MANUAL; AUDIENCE; The manual contains the following chapters:; SYNTAX DIAGRAM CONVENTIONS; Syntax diagrams appear in
FairCom Corporation v Documentation Overview PURPOSE OF THIS MANUAL This manual provides reference material for the ISQL interactive SQL utility as well as the dbload , dbdump , and dbschema administrative tools provided in the c-treeSQL environment. It also includes a tutorial describing how to use...
Page 8 - RELATED DOCUMENTATION; Refer to the following documents for more information:
ISQL and Tools vi FairCom Corporation RELATED DOCUMENTATION Refer to the following documents for more information: lowercase Lowercase type denotes either user-supplied elements or names of other syntax diagrams. User-supplied elements include names of tables, host-language variables, expressions, a...
Page 9 - Chapter 1; Introduction; OVERVIEW; Learn how SQL statements work
FairCom Corporation 1-1 Chapter 1 Introduction 1.1 OVERVIEW Interactive SQL (often referred to throughout this manual as ISQL) is a utility supplied with c-treeSQL that lets you issue SQL statements directly from a terminal and see results displayed at the terminal. You can use interactive SQL to: •...
Page 11 - Chapter 2; Quick Tour; INTRODUCTORY TUTORIAL; Start and Product Overview Guide; Init; At the command line prompt type:
FairCom Corporation 2-1 Chapter 2 Quick Tour 2.1 INTRODUCTORY TUTORIAL iSQL_Tutorial1.sql This introductory tutorial will rapidly take you through the basic use of the powerful interactive SQL (iSQL) database interface. iSQL is a full featured command line client side query tool useful for submittin...
Page 12 - Define; Add Records
ISQL and Tools 2-2 FairCom Corporation 2.1.2 Define In this case define consists of the CREATE TABLE statement. This is done in a single iSQL statement in which specific fields are defined. Upon successful creation of the table, the changes made to the database by this transaction are made permanent...
Page 13 - Display Records; Done; Below is the interactive SQL for DONE:; Complete Introductory Tutorial Code
Quick Tour FairCom Corporation 2-3 VALUES ('1001', '61434', 'CT', '1', 'Michael Jordan', '13 Main', 'Harford'); ISQL> INSERT INTO CUSTMAST VALUES ('1002', '73677', 'GA', '1', 'Joshua Brown', '4356 Cambridge', 'Atlanta'); ISQL> INSERT INTO CUSTMAST VALUES ('1003', '10034', 'MO', '1', 'Keyon Doo...
Page 14 - Relational Database
ISQL and Tools 2-4 FairCom Corporation 2.2 RELATIONAL MODEL AND INDEXING TUTORIAL iSQL_Tutorial2.sql This intermediate tutorial will advance the concepts introduced in the first tutorial by expanding the number of tables and building a relational model. This tutorial will walk you through defining a...
Page 15 - orderlist
Quick Tour FairCom Corporation 2-5 OrderList - A table of records consisting of a list of orders. OrderItem - A table of records consisting of specific items associated with an order. ItemMaster - A table of records consisting of information about items. CustomerMaster - A table of records consistin...
Page 16 - Manage; INSERT INTO - This will add a record by inserting it into the table
ISQL and Tools 2-6 FairCom Corporation ISQL> CREATE INDEX itemnum ON itemmast (im_itemnum); ISQL> CREATE TABLE custmast ( cm_custnum VARCHAR(5), cm_zip VARCHAR(10), cm_state VARCHAR(3), cm_rating VARCHAR(2), cm_name VARCHAR(48), cm_address VARCHAR(48), cm_city VARCHAR(48)); ISQL> CREATE IND...
Page 17 - The report will appear as follows:
Quick Tour FairCom Corporation 2-7 INSERT INTO custmast VALUES ('1000', '92867', 'CA', '1', 'Bryan Williams', '2999 Regency', 'Orange'); INSERT INTO custmast VALUES ('1001', '61434', 'CT', '1', 'Michael Jordan', '13 Main', 'Harford'); INSERT INTO custmast VALUES ('1002', '73677', 'GA', '1', 'Joshua ...
Page 19 - LOCKING TUTORIAL
Quick Tour FairCom Corporation 2-9 2.3 LOCKING TUTORIAL iSQL_Tutorial3.sql This tutorial will introduce the concept of locking. The function-ality for this tutorial focuses on adding records, then updating a single record to the customer master table. From the iSQL utility the script will be parsed ...
Page 20 - Below is the interactive SQL for DEFINE:; SELECT - Fetch records according to select criteria
ISQL and Tools 2-10 FairCom Corporation 2.3.2 Define In this case define consists of the CREATE TABLE statement. This is done in a single iSQL statement in which specific fields are defined. Upon successful creation of the table, the changes made to the database by this transaction are made permanen...
Page 21 - Below is the interactive SQL for MANAGE:; Delete Records; Update Record
Quick Tour FairCom Corporation 2-11 The first process has the record associated with customer number 1003 locked. Meanwhile the second process has attempted to delete the contents of the customer master table and has been blocked when attempting to lock the table. At this point both processes are ef...
Page 22 - Complete Locking Tutorial Source Code; Complete source code for the locking tutorial can be found in
ISQL and Tools 2-12 FairCom Corporation 2.3.5 Complete Locking Tutorial Source Code Complete source code for the locking tutorial can be found in Appendix A "Tutorial Source Code" .
Page 23 - TRANSACTION PROCESSING TUTORIAL; Transaction processing in iSQL is handled by two statements:
Quick Tour FairCom Corporation 2-13 2.4 TRANSACTION PROCESSING TUTORIAL iSQL_Tutorial4.sql This tutorial will introduce the concept of transaction processing, based on the relational model of the previous tutorial. Records will be added to tables orderlist and orderitems as a single transac-tion. Tr...
Page 24 - Transaction
ISQL and Tools 2-14 FairCom Corporation Transaction These tables consist of a Customer Master table and an Item Master table that support prima-rily static information regarding a company's product line and customer demographics. The orderlist and orderitems tables consist of dynamic information per...
Page 27 - Chapter; ISQL Statements; erence Guide; STARTING INTERACTIVE SQL; To exit from interactive SQL, type EXIT or QUIT.; Syntax
FairCom Corporation 3-1 Chapter 3 ISQL Statements 3.1 OVERVIEW This chapter describes only those statements that are specific to ISQL. See the c-treeSQL Ref- erence Guide for detailed reference information on standard SQL statements that can be issued in other environments. 3.2 STARTING INTERACTIVE ...
Page 28 - A string that specifies which database to connect to. The; STATEMENT HISTORY SUPPORT; csh
ISQL and Tools 3-2 FairCom Corporation The file name must be enclosed in doubles quotes, such as:isql -s "test script.sql" testdb -u user_name The user name c-treeSQL uses to connect to the database specified in the connect_string . c- treeSQL verifies the user name against a corresponding p...
Page 29 - FORMATTING OUTPUT OF ISQL QUERIES; Table 3-1: ISQL Statements for Statement History Support
ISQL Statements FairCom Corporation 3-3 3.4 FORMATTING OUTPUT OF ISQL QUERIES Formatting of database query results makes the output of a database query more presentable and understandable. The formatted output of an ISQL database query can be either displayed on the screen, written to a file, or spo...
Page 30 - Table 3-2: ISQL Statements for Query Formatting
ISQL and Tools 3-4 FairCom Corporation ISQL includes several statements that provide simple formatting of SQL queries. The follow-ing table summarizes the ISQL query-formatting statements. The rest of this section provides an extended example that illustrates how to use the statements together to im...
Page 31 - customers
ISQL Statements FairCom Corporation 3-5 All the examples use the same ISQL query. The query retrieves data on outstanding customer orders. The query joins two tables, customers and orders . The examples for the TABLE state- ment on Section 3.7.13 "HOST or SH or !" on page 3-31 show the colum...
Page 32 - Formatting Column Display with the COLUMN Statement; Example 3-2: Controlling Display Width of Character Columns
ISQL and Tools 3-6 FairCom Corporation 3.4.1 Formatting Column Display with the COLUMN Statement You can specify the width of the display for character columns with the COLUMN statement's "An" format string. Specify the format string in the FORMAT clause of the COLUMN state-ment. You need to...
Page 33 - Example 3-3: Customizing Format of Numeric Column Displays
ISQL Statements FairCom Corporation 3-7 Example 3-3: Customizing Format of Numeric Column Displays ISQL> column order_value format "$99,999,999.99" ISQL> column; -- Show all the COLUMN statements now in effect: column CUSTOMER_NAME format "A19" heading "CUSTOMER_NAME" c...
Page 34 - whenever the value in the; column) and the other calculates the total cost of orders
ISQL and Tools 3-8 FairCom Corporation whenever the value in the customer_name column changes. In other words, we need to specify a column break on the customer_name column. Approach this task in two steps. First, devise a DISPLAY statement to display the customer name and confirm that it is display...
Page 35 - umn carries over to the; Adding Beginning and Concluding Titles with the TITLE Statement
ISQL Statements FairCom Corporation 3-9 The following example also issues two more DISPLAY statements to display the variable val-ues. As before, the DISPLAY statements must specify the customer_name break. They also indent their display farther to indicate the relationship with the previously issue...
Page 36 - Example 3-6: Specifying a Query Header and Footer with TITLE
ISQL and Tools 3-10 FairCom Corporation The TITLE statement lets you specify text that ISQL displays before (TITLE TOP) or after (TITLE BOTTOM) the query results. The title can also be horizontally positioned by specifying the keywords LEFT, CENTER, or RIGHT; or by specifying the actual column numbe...
Page 37 - THE HELP AND TABLE STATEMENTS; HELP - Displays the options that can be specified for HELP.; TRANSACTION SUPPORT
ISQL Statements FairCom Corporation 3-11 End of Orders Summary Report 23 records selected ISQL> 3.5 THE HELP AND TABLE STATEMENTS ISQL supports an on-line help facility that can be invoked by using the HELP statement. Typ-ing HELP at the ISQL prompt will display a help file which will list the op...
Page 38 - ISQL REFERENCE; c-treeSQL Reference Manual; filename; The name of the script file.; Notes; The following example shows a simple ISQL script file.
ISQL and Tools 3-12 FairCom Corporation <SQL statement> ROLLBACK WORK ; An SQL statement starting immediately after a COMMIT WORK or ROLLBACK WORK statement starts a new transaction. 3.7 ISQL REFERENCE This section provides reference material for statements specific to ISQL. This section does ...
Page 39 - cmdfile; BREAK; ROW
ISQL Statements FairCom Corporation 3-13 insert into stores values (1001,chassis); insert into stores values (1002,chips); select * from stores where item_no > 1001; set echo off ; To execute the above statements stored in a file named cmdfile , enter: ISQL> @cmdfile 3.7.2 BREAK Syntax BREAK [...
Page 40 - Examples; PAGE; REPORT
ISQL and Tools 3-14 FairCom Corporation SKIP n The optional SKIP clause can be used to skip the specified number of lines when the specified break occurs and before processing of any associated DISPLAY statements. Examples The following examples illustrate how various break settings and correspondin...
Page 41 - CLEAR
ISQL Statements FairCom Corporation 3-15 ISQL> select customer_name from customers; CUSTOMER_NAME ------------- Sports Cars Inc. Break on every row! Mighty Bulldozer Inc. Break on every row! Ship Shapers Inc. Break on every row! . . . ISQL> break on page ISQL> select customer_name from cust...
Page 42 - Description; option; COLUMN
ISQL and Tools 3-16 FairCom Corporation | BREAK | COLUMN | COMPUTE | DISPLAY | TITLE Description The CLEAR statement removes settings made by the ISQL statement corresponding to option. Argument option Which ISQL statement's settings to clear: • CLEAR HISTORY - Clears the ISQL statement history buff...
Page 43 - but omits both the FORMAT and HEADING clauses, ISQL clears any
ISQL Statements FairCom Corporation 3-17 Description The COLUMN statement controls how ISQL displays a column's values (the FORMAT clause) and specifies alternative column-heading text (the HEADING clause). The COLUMN statement without any arguments displays the current column specifications. Argume...
Page 45 - The following examples are based on a table,; Table 3-4: Date-Time Format Strings for the COLUMN Statement
ISQL Statements FairCom Corporation 3-19 Examples The following examples are based on a table, orders , with columns defined as follows: ISQL> table orders COLNAME NULL ? TYPE LENGTH ------- ------ ---- ------ order_id NOT NULL INT 4 customer_id INT 4 steel_type CHAR 20 W The week of month as a 1...
Page 46 - The following examples use the single-value system table,
ISQL and Tools 3-20 FairCom Corporation order_info CHAR 200 order_weight INT 4 order_value INT 4 order_state CHAR 20 ISQL displays the order_info column, at 200 characters, with lots of blank space preceding the values: ISQL> select order_info from orders where order_value < 1000000 ORDER_INFO...
Page 47 - COMPUTE
ISQL Statements FairCom Corporation 3-21 Thursday 1 record selected ISQL> column sysdate format "Month" ISQL> select sysdate from syscalctable SYSDATE ------- May 1 record selected ISQL> column sysdate format "DDth" ISQL> select sysdate from syscalctable SYSDATE ------- 7...
Page 48 - Arguments
ISQL and Tools 3-22 FairCom Corporation COMPUTE statements have no effect until you issue a BREAK statement with the same break_spec . Issuing the COMPUTE statement without any arguments displays the currently-set COM-PUTE specifications, if any. Arguments AVG | MAX | MIN | SUM | COUNT The function ...
Page 49 - Specifies the name by which the variable can be referred to.; value; The following example defines a variable called
ISQL Statements FairCom Corporation 3-23 3.7.6 DEFINE Syntax DEFINE [ variable_name = value ] ; Description The DEFINE statement defines a variable and assigns an ASCII string value to it. When you refer to the defined variable in DISPLAY statements, ISQL prints the value. The DEFINE statement is us...
Page 50 - If the DISPLAY statement omits
ISQL and Tools 3-24 FairCom Corporation Issuing the DISPLAY statement without any arguments displays the currently-set DISPLAY specifications, if any. Arguments col_position An optional argument that specifies the horizontal positioning of the associated display value. There are two forms for the ar...
Page 51 - display values for those columns:; EDIT
ISQL Statements FairCom Corporation 3-25 ISQL> display col 5 "Number of orders placed by", customer_name, "=", n_ord on customer_name ISQL> compute count of order_id in n_ord on customer_name; ISQL> select c.customer_name, o.order_id from customers c, orders o where o.custom...
Page 52 - EXIT or QUIT; The EXIT statement terminates the ISQL session.; Related Statements
ISQL and Tools 3-26 FairCom Corporation edited. When you exit the editor, ISQL writes the buffer contents as the last statement in the history buffer. By default, ISQL invokes the vi editor on UNIX and the MS-DOS editor on NT. You can change the default by setting the EDITOR environment variable: • ...
Page 53 - Execute the statement read by GET using the RUN statement.
ISQL Statements FairCom Corporation 3-27 3.7.10 GET Syntax G[ET] filename; Description The GET statement reads the first SQL statement stored in the specified script file. Arguments filename The name of the script file. ISQL reads the file until it encounters a semicolon ( ; ) statement terminator. ...
Page 57 - The operating system command to execute. If; Example
ISQL Statements FairCom Corporation 3-31 3.7.13 HOST or SH or ! Syntax { HOST | SH | ! } [host_command]; Description The HOST statement executes a host operating system command without terminating the cur-rent ISQL session. Arguments HOST | SH | ! Synonyms for directing ISQL to execute an operating ...
Page 58 - LIST; If LIST omits; from customers) and copy it to the end of the history list. It then
ISQL and Tools 3-32 FairCom Corporation 3.7.14 LIST Syntax L[IST] [ stmt_num ]; Description The LIST statement displays the statement with the specified statement number from the state-ment history buffer and makes it the current statement by adding it to the end of the history list. If LIST omits s...
Page 59 - The QUIT statement terminates the current ISQL session.
ISQL Statements FairCom Corporation 3-33 3.7.15 QUIT or EXIT Syntax Q[UIT] Description The QUIT statement terminates the current ISQL session. Related Statements QUIT and EXIT are synonymous. There is no difference in their effect. 3.7.16 RUN Syntax R[UN] [stmt_num]; Description The RUN statement ex...
Page 61 - Sets the number of lines per page. The default is 24 lines. After each; LINESIZE; Sets the number of lines to be displayed. The default is 1.
ISQL Statements FairCom Corporation 3-35 | COMMAND LINES number_lines | REPORT { ON | OFF } | ECHO { ON | OFF } | PAUSE { ON | OFF } | TIME { ON | OFF } | DISPLAY COST { ON | OFF } | AUTOCOMMIT { ON | OFF } | TRANSACTION ISOLATION LEVEL isolation_level | CONNECTION { database_name | DEFAULT } Descri...
Page 62 - Manual
ISQL and Tools 3-36 FairCom Corporation DISPLAY COST ON | OFF SET DISPLAY COST ON displays the values the c-treeSQL optimizer uses to calculate the least-costly query strategy for a particular SQL statement. The UPDATE STATISTICS statement updates the values displayed by SET DISPLAY COST ON. SET DIS...
Page 63 - SHOW; , it displays all the
ISQL Statements FairCom Corporation 3-37 sys_chkcol_usage sys_keycol_usage Here's a page break! . . . ISQL> SET DISPLAY COST ON ISQL> -- Select from the one-record SYSCALCTABLE table: ISQL> SELECT * FROM SYSCALCTABLE; Estimated Cost Values : ----------------------- COST : 8080 CARDINALITY :...
Page 64 - SPOOL; filename ON; Closes the file opened by the SPOOL ON statement.; OUT; lpr
ISQL and Tools 3-38 FairCom Corporation ____________________ EDITOR ..................... : vi HISTORY buffer size ........ : 50 PAUSE ..................... : ON COMMAND LINES .............. : 10 TIMEing command execution.. : OFF SPOOLing ................... : ON LINESIZE .................. : 78 REP...
Page 65 - To record the displayed output into the file called STK, enter:
ISQL Statements FairCom Corporation 3-39 Example To record the displayed output into the file called STK, enter: ISQL> SPOOL STK ON ; ISQL> SELECT * FROM customer ; ISQL> SPOOL OFF ; 3.7.21 START Syntax ST[ART] filename [ argument ] [ ... ] ; Description The START statement executes the fir...
Page 66 - TABLE; With the; ADMIN
ISQL and Tools 3-40 FairCom Corporation ISQL> -- Display a script file with the ! shell statement. The script's SQL ISQL> -- statement uses the LIKE predicate to retrieve customer names ISQL> -- beginning with the string passed as an argument in a START statement: ISQL> ! more start_ex.s...
Page 67 - The following example uses the
ISQL Statements FairCom Corporation 3-41 has_ccnstrs NOT NULL VARCHAR 1 has_ucnstrs NOT NULL VARCHAR 1 tbl_status NOT NULL VARCHAR 1 rssid NOT NULL INT 4 The following example uses the table command to detail the structure of the tables used in examples throughout this chapter. ISQL> table - List...
Page 68 - TITLE; The text to be displayed.; SKIP n
ISQL and Tools 3-42 FairCom Corporation lot_id NOT NULL INT 4 purity DOUBLE 8 p_deviation DOUBLE 8 strength DOUBLE 8 s_deviation DOUBLE 8 comments CHAR 200 ISQL> table samples COLNAME NULL ? TYPE LENGTH ------- ------ ---- ------ lot_id INT 4 samples INT 4 comments CHAR 200 ISQL> 3.7.23 TITLE ...
Page 71 - Data Load Utility: dbload; INTRODUCTION
FairCom Corporation 4-1 Chapter 4 Data Load Utility: dbload 4.1 INTRODUCTION This chapter describes the c-treeSQL database load utility, dbload . This utility loads records from an input data file into tables of a database. The format of the data file is specified by a record description given in an...
Page 72 - PREREQUISITES FOR DBLOAD; DBLOAD COMMAND LINE SYNTAX
ISQL and Tools 4-2 FairCom Corporation Figure 4-1: dbload Execution Process 4.2 PREREQUISITES FOR DBLOAD Before running dbload , you need: • A valid, readable commands file • INSERT privileges on the tables named in the commands file 4.3 DBLOAD COMMAND LINE SYNTAX The dbload command does not directl...
Page 73 - stderr; database; DATA FILE FORMATS
Data Load Utility: dbload FairCom Corporation 4-3 -l logfile Specifies the file into which the error logging is done. stderr is the default. dbload also writes statistics to the file: • Number of records read • Number of records skipped • Number of records loaded • Number of records rejected -b badf...
Page 74 - Variable Length Records; Fixed Length Records; THE COMMANDS FILE
ISQL and Tools 4-4 FairCom Corporation 4.4.1 Variable Length Records For variable length records, the fields in the data file can be of varying length. Unless the key-word FIXED is used in the commands file, it is assumed that the dbload record processing will be for variable length records. 4.4.2 F...
Page 75 - The DEFINE RECORD Statement; Names the record to be loaded; is the name used to refer to the records found in the data file.
Data Load Utility: dbload FairCom Corporation 4-5 4.5.1 The DEFINE RECORD Statement The DEFINE RECORD statement is used to define the record that is to be loaded into the data-base. It describes the data found in the data file. The following are the definitions that are made known by the DEFINE RECO...
Page 76 - The FOR EACH Statement
ISQL and Tools 4-6 FairCom Corporation • start_position is the position where the field starts. It must be an unsigned integer. • end_position is the position where the field ends. It must be an unsigned integer. The first position of each record is 1 and not 0. If date and time types are to be inse...
Page 77 - name; EXAMPLES; customer
Data Load Utility: dbload FairCom Corporation 4-7 statement. The following example shows the list interchanged with respect to the list in the DEFINE RECORD statement. DEFINE RECORD dept_rec AS ( dept_no, dept_name, location ) FIELD DELIMITER ' ' ; FOR EACH RECORD dept_rec FROM dept_in INSERT INTO A...
Page 78 - DBLOAD ERRORS; Record name redefined.
ISQL and Tools 4-8 FairCom Corporation The following is the commands file to load records into the orders table. The input data file is orders_in which is a binary file in the fixed length record format. DEFINE RECORD orders_rec OF FIXED LENGTH 30 AS ( order_no POSITION (1:4) LONG, order_date POSITI...
Page 79 - Fatal Errors; The following are a list of nonrecoverable errors.
Data Load Utility: dbload FairCom Corporation 4-9 Position for SHORT not specified correctly. The size of the field (start position to end position) must be equal to the size of SHORT. Position for LONG not specified correctly. The size of the field (start position to end position) must be equal to ...
Page 81 - Data Unload Utility: dbdump; PREREQUISITES FOR DBDUMP; dbdump
FairCom Corporation 5-1 Chapter 5 Data Unload Utility: dbdump 5.1 INTRODUCTION This chapter describes the c-treeSQL database dump utility, dbdump . dbdump writes the data in a database to a file. The format of the exported data is specified by the record description given in an input command file to...
Page 82 - DBDUMP COMMAND LINE SYNTAX; orders
ISQL and Tools 5-2 FairCom Corporation • SELECT privileges on the tables named in the commands file 5.3 DBDUMP COMMAND LINE SYNTAX The dbdump command accepts the commands file name, the database name and a command option. Syntax dbdump -f commands_file [-n] database_name Options -f commands_file Spe...
Page 83 - The syntax definition for the commands file is as shown:; Names the record of the output file
Data Unload Utility: dbdump FairCom Corporation 5-3 The syntax definition for the commands file is as shown: dbdump_commands: define_record_statement for_record_statement The following is sample commands file showing dump instructions. DEFINE RECORD ord_rec AS ( ord_no, item_name, date, item_qty ) F...
Page 84 - date; The FOR RECORD Statement
ISQL and Tools 5-4 FairCom Corporation • record_length is the length of the fixed length record. This length should include the length of field or record delimiters, if any. • field_name is the name used to refer to a field in the data file. • delimiter_char is the field delimiter and is a single ch...
Page 87 - Schema Export Utility: dbschema; This chapter describes the c-treeSQL utility,; dbschema; Options; Displays brief online help of
FairCom Corporation 6-1 Chapter 6 Schema Export Utility: dbschema 6.1 INTRODUCTION This chapter describes the c-treeSQL utility, dbschema . This utility recreates specified data- base elements and data. Syntax dbschema [ -h ] [ -d ] [-u user_name ] [-a password ] [ -o outfile ] [ -p [ user_name.]pro...
Page 89 - foo
Schema Export Utility: dbschema FairCom Corporation 6-3 ADMIN@isis% dbschema -t dbp1,test_view rdsdb DBSCHEMA create table ADMIN.dbp1 ( c1 integer ) pctfree 20; create view ADMIN.test_view ( fld ) as select * from test_revoke1 ; The following example uses the -p option with the % wildcard character ...
Page 91 - Appendix A; Tutorial Source Code; RELATIONAL MODEL AND INDEXING TUTORIAL
FairCom Corporation A-1 Appendix A Tutorial Source Code A.1 INTRODUCTORY TUTORIAL CREATE TABLE CUSTMAST ( cm_custnum VARCHAR(5), cm_zip VARCHAR(10), cm_state VARCHAR(3), cm_rating VARCHAR(2), cm_name VARCHAR(48), cm_address VARCHAR(48), cm_city VARCHAR(48) ); COMMIT WORK; INSERT INTO CUSTMAST VALUES...
Page 97 - Index; Symbols
FairCom Corporation Index-i Index Symbols @Execute syntax . . . . . . . . . . . . . . . . . . . . . 3-12 A Adding titles . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 B Beginning titles . . . . . . . . . . . . . . . . . . . . . . . 3-9 BREAK statement . . . . . . . . . . . . . . . . . . . ...