HP c-tree-SQL ISQL and Tools Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Software HP c-tree-SQL ISQL and Tools herunter. HP c-tree-SQL ISQL and Tools User's Manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 99
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
ISQL and Tools Reference Guide
For use with c-treeSQL Server
This manual provides reference material for the ISQL interactive SQL utility
and other administrative tools provided in the c-treeSQL environment. It also
includes a tutorial describing how to use the ISQL utility.
Seitenansicht 0
1 2 3 4 5 6 ... 98 99

Inhaltsverzeichnis

Seite 1 - For use with c-treeSQL Server

ISQL and Tools Reference Guide For use with c-treeSQL ServerThis manual provides reference material for the ISQL interactive SQL utility and other adm

Seite 2

ISQL and Tools 1-2 FairCom Corporation

Seite 3 - Table of Contents

FairCom Corporation 2-1Chapter 2Quick Tour2.1 INTRODUCTORY TUTORIALiSQL_Tutorial1.sqlThis introductory tutorial will rapidly take you through the basi

Seite 4 - 4 Data Load Utility: dbload

ISQL and Tools2-2 FairCom Corporation2.1.2 DefineIn this case define consists of the CREATE TABLE statement. This is done in a single iSQL statement i

Seite 5

Quick TourFairCom Corporation 2-3VALUES ('1001', '61434', 'CT', '1', 'Michael Jordan', '13 Main

Seite 6

ISQL and Tools2-4 FairCom Corporation2.2 RELATIONAL MODEL AND INDEXING TUTORIALiSQL_Tutorial2.sqlThis intermediate tutorial will advance the concepts

Seite 7 - Documentation Overview

Quick TourFairCom Corporation 2-5OrderList - A table of records consisting of a list of orders. OrderItem - A table of records consisting of specific

Seite 8 - RELATED DOCUMENTATION

ISQL and Tools2-6 FairCom CorporationISQL> CREATE INDEX itemnum ON itemmast (im_itemnum);ISQL> CREATE TABLE custmast ( cm_custnum VARCHAR(5),

Seite 9 - Introduction

Quick TourFairCom Corporation 2-7INSERT INTO custmast VALUES ('1000', '92867', 'CA', '1', 'Bryan Willia

Seite 10 - 1-2 FairCom Corporation

ISQL and Tools2-8 FairCom Corporation2.2.5 Complete Relational Model and Indexing Tutorial Source CodeComplete source code for the relational model an

Seite 11 - Quick Tour

Quick TourFairCom Corporation 2-92.3 LOCKING TUTORIALiSQL_Tutorial3.sqlThis tutorial will introduce the concept of locking. The function-ality for th

Seite 12 - Add Records

Copyright © 1992-2004 FairCom Corporation All rights reserved.Portions © 1987-2004 Dharma Systems, Inc. All rights reserved.Eleventh Edition, First pr

Seite 13 - Display Records

ISQL and Tools2-10 FairCom Corporation2.3.2 DefineIn this case define consists of the CREATE TABLE statement. This is done in a single iSQL statement

Seite 14 - TUTORIAL

Quick TourFairCom Corporation 2-11The first process has the record associated with customer number 1003 locked. Meanwhile the second process has atte

Seite 15

ISQL and Tools2-12 FairCom Corporation2.3.5 Complete Locking Tutorial Source CodeComplete source code for the locking tutorial can be found in Appendi

Seite 16 - 2.2.3 Manage

Quick TourFairCom Corporation 2-132.4 TRANSACTION PROCESSING TUTORIALiSQL_Tutorial4.sqlThis tutorial will introduce the concept of transaction process

Seite 17 - 2.2.4 Done

ISQL and Tools2-14 FairCom CorporationTransactionThese tables consist of a Customer Master table and an Item Master table that support prima-rily stat

Seite 18 - Tutorial Source Code

Quick TourFairCom Corporation 2-152.4.3 ManageThis step provides data management functionality for the applica-tion. In this example we will add recor

Seite 19 - 2.3 LOCKING TUTORIAL

ISQL and Tools2-16 FairCom CorporationSELECT orderlist.ol_custnum, custmast.cm_custnum FROM orderlist, custmast WHERE orderlist.ol_custnum = cus

Seite 20 - 2.3.3 Manage

FairCom Corporation 3-1Chapter 3ISQL Statements3.1 OVERVIEWThis chapter describes only those statements that are specific to ISQL. See the c-treeSQL R

Seite 21 - 2.3.4 Done

ISQL and Tools3-2 FairCom CorporationThe file name must be enclosed in doubles quotes, such as:isql -s "test script.sql" testdb -u user_name

Seite 22 - Tutorial Source Code"

ISQL StatementsFairCom Corporation 3-33.4 FORMATTING OUTPUT OF ISQL QUERIESFormatting of database query results makes the output of a database query m

Seite 23 - 2.4.2 Define

FairCom Corporation iTable

Seite 24 - Transaction

ISQL and Tools3-4 FairCom CorporationISQL includes several statements that provide simple formatting of SQL queries. The follow-ing table summarizes t

Seite 25 - 2.4.3 Manage

ISQL StatementsFairCom Corporation 3-5All the examples use the same ISQL query. The query retrieves data on outstanding customer orders. The query joi

Seite 26 - Source Code

ISQL and Tools3-6 FairCom Corporation3.4.1 Formatting Column Display with the COLUMN StatementYou can specify the width of the display for character c

Seite 27 - ISQL Statements

ISQL StatementsFairCom Corporation 3-7Example 3-3: Customizing Format of Numeric Column DisplaysISQL> column order_value format "$99,999,999.

Seite 28 - 3.3 STATEMENT HISTORY SUPPORT

ISQL and Tools3-8 FairCom Corporationwhenever the value in the customer_name column changes. In other words, we need to specify a column break on the

Seite 29 - FairCom Corporation 3-3

ISQL StatementsFairCom Corporation 3-9The following example also issues two more DISPLAY statements to display the variable val-ues. As before, the DI

Seite 30

ISQL and Tools3-10 FairCom CorporationThe TITLE statement lets you specify text that ISQL displays before (TITLE TOP) or after (TITLE BOTTOM) the quer

Seite 31

ISQL StatementsFairCom Corporation 3-11 End of Orders Summary Report 23 records selectedISQL> 3.5 T

Seite 32

ISQL and Tools3-12 FairCom Corporation<SQL statement> ROLLBACK WORK ;An SQL statement starting immediately after a COMMIT WORK or ROLLBACK WORK

Seite 33

ISQL StatementsFairCom Corporation 3-13insert into stores values (1001,chassis);insert into stores values (1002,chips);select * from stores where item

Seite 34

ii FairCom Corporation3.5 The HELP and TABLE Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-113.6 Transa

Seite 35

ISQL and Tools3-14 FairCom CorporationSKIP nThe optional SKIP clause can be used to skip the specified number of lines when the specified break occurs

Seite 36

ISQL StatementsFairCom Corporation 3-15ISQL> select customer_name from customers; CUSTOMER_NAME ---------

Seite 37 - 3.6 TRANSACTION SUPPORT

ISQL and Tools3-16 FairCom Corporation | BREAK | COLUMN | COMPUTE | DISPLAY | TITLEDescriptionThe CLEAR statement removes set

Seite 38 - 3.7 ISQL REFERENCE

ISQL StatementsFairCom Corporation 3-17DescriptionThe COLUMN statement controls how ISQL displays a column's values (the FORMAT clause) and speci

Seite 39 - Arguments

ISQL and Tools3-18 FairCom Corporation(a) Format String DetailsTable 3-3: Numeric Format Strings for the COLUMN StatementCharacter Example Descriptio

Seite 40 - Examples

ISQL StatementsFairCom Corporation 3-19ExamplesThe following examples are based on a table, orders, with columns defined as follows:ISQL> table ord

Seite 41 - 3.7.3 CLEAR

ISQL and Tools3-20 FairCom Corporationorder_info CHAR 200order_weight IN

Seite 42 - 3.7.4 COLUMN

ISQL StatementsFairCom Corporation 3-21 Thursday 1 record selectedISQL> column sysdate format "Month"ISQL> select sysdate from sysc

Seite 43

ISQL and Tools3-22 FairCom CorporationCOMPUTE statements have no effect until you issue a BREAK statement with the same break_spec. Issuing the COMPUT

Seite 44 - (a) Format String Details

ISQL StatementsFairCom Corporation 3-233.7.6 DEFINESyntaxDEFINE [ variable_name = value ] ;Description The DEFINE statement defines a variable and ass

Seite 45

FairCom Corporation iii5.4

Seite 46

ISQL and Tools3-24 FairCom CorporationIssuing the DISPLAY statement without any arguments displays the currently-set DISPLAY specifications, if any.Ar

Seite 47 - 3.7.5 COMPUTE

ISQL StatementsFairCom Corporation 3-25ISQL> display col 5 "Number of orders placed by", customer_name, "=", n_ord on customer_

Seite 48

ISQL and Tools3-26 FairCom Corporationedited. When you exit the editor, ISQL writes the buffer contents as the last statement in the history buffer.By

Seite 49

ISQL StatementsFairCom Corporation 3-273.7.10 GETSyntaxG[ET] filename;DescriptionThe GET statement reads the first SQL statement stored in the specifi

Seite 50

ISQL and Tools3-28 FairCom Corporation ( orders.order_id = lots.order_id ) and ( ( customers.customer_name = 'Ship Shapers Inc.&a

Seite 51 - 3.7.8 EDIT

ISQL StatementsFairCom Corporation 3-29CUSTOMER_NAME ORDER_INFO -------------

Seite 52 - Related Statements

ISQL and Tools3-30 FairCom CorporationDescriptionThe HISTORY statement lists the statements in the statement history buffer, along with an identifying

Seite 53

ISQL StatementsFairCom Corporation 3-313.7.13 HOST or SH or !Syntax{ HOST | SH | ! } [host_command];DescriptionThe HOST statement executes a host oper

Seite 54 - 3-28 FairCom Corporation

ISQL and Tools3-32 FairCom Corporation3.7.14 LISTSyntaxL[IST] [ stmt_num ];DescriptionThe LIST statement displays the statement with the specified sta

Seite 55

ISQL StatementsFairCom Corporation 3-333.7.15 QUIT or EXITSyntaxQ[UIT] DescriptionThe QUIT statement terminates the current ISQL session.Related State

Seite 56

iv FairCom Corporation

Seite 57 - 3.7.13 HOST or SH or !

ISQL and Tools3-34 FairCom CorporationOffice Furniture Inc. 10 records selectedISQL> 3.7.17 SAVESyntaxS[AVE] filename;

Seite 58 - 3.7.14 LIST

ISQL StatementsFairCom Corporation 3-35 | COMMAND LINES number_lines | REPORT { ON | OFF } | ECHO { ON | OFF } | PAUSE {

Seite 59

ISQL and Tools3-36 FairCom CorporationDISPLAY COST ON | OFFSET DISPLAY COST ON displays the values the c-treeSQL optimizer uses to calculate the least

Seite 60

ISQL StatementsFairCom Corporation 3-37sys_chkcol_usagesys_keycol_usageHere's a page break! ...ISQL> SET DISPLAY COST ONISQL> -- Select f

Seite 61

ISQL and Tools3-38 FairCom Corporation ____________________ EDITOR ... : viHISTORY buffer size ... : 50

Seite 62

ISQL StatementsFairCom Corporation 3-39ExampleTo record the displayed output into the file called STK, enter:ISQL> SPOOL STK ON ;ISQL> SELECT *

Seite 63 - 3.7.19 SHOW

ISQL and Tools3-40 FairCom CorporationISQL> -- Display a script file with the ! shell statement. The script's SQL ISQL> -- statement uses t

Seite 64 - 3.7.20 SPOOL

ISQL StatementsFairCom Corporation 3-41has_ccnstrs NOT NULL VARCHAR 1has_ucnstrs NOT NULL V

Seite 65

ISQL and Tools3-42 FairCom Corporationlot_id NOT NULL INT 4purity DO

Seite 66 - 3.7.22 TABLE

ISQL StatementsFairCom Corporation 3-43ExamplesThe following example shows the effect of specifying a top title without a bottom title, then both a to

Seite 67 - FairCom Corporation 3-41

FairCom Corporation vDocumentation Overview PURPOSE OF THIS MANUALThis manual provides reference material for the ISQL interactive SQL utility as wel

Seite 68 - 3.7.23 TITLE

ISQL and Tools3-44 FairCom Corporation

Seite 69

FairCom Corporation 4-1Chapter 4Data Load Utility: dbload4.1 INTRODUCTIONThis chapter describes the c-treeSQL database load utility, dbload. This util

Seite 70 - 3-44 FairCom Corporation

ISQL and Tools4-2 FairCom CorporationFigure 4-1: dbload Execution Process4.2 PREREQUISITES FOR DBLOADBefore running dbload, you need:• A valid, reada

Seite 71 - Data Load Utility: dbload

Data Load Utility: dbloadFairCom Corporation 4-3-l logfileSpecifies the file into which the error logging is done. stderr is the default. dbload also

Seite 72 - 4.2 PREREQUISITES FOR DBLOAD

ISQL and Tools4-4 FairCom Corporation4.4.1 Variable Length RecordsFor variable length records, the fields in the data file can be of varying length. U

Seite 73 - 4.4 DATA FILE FORMATS

Data Load Utility: dbloadFairCom Corporation 4-54.5.1 The DEFINE RECORD StatementThe DEFINE RECORD statement is used to define the record that is to b

Seite 74 - 4.5 THE COMMANDS FILE

ISQL and Tools4-6 FairCom Corporation• start_position is the position where the field starts. It must be an unsigned integer.• end_position is the pos

Seite 75

Data Load Utility: dbloadFairCom Corporation 4-7statement. The following example shows the list interchanged with respect to the list in the DEFINE RE

Seite 76 - 4.5.2 The FOR EACH Statement

ISQL and Tools4-8 FairCom CorporationThe following is the commands file to load records into the orders table. The input data file is orders_in which

Seite 77 - 4.6 EXAMPLES

Data Load Utility: dbloadFairCom Corporation 4-9Position for SHORT not specified correctly.The size of the field (start position to end position) must

Seite 78 - 4.7 DBLOAD ERRORS

ISQL and Tools vi FairCom Corporation RELATED DOCUMENTATIONRefer to the following documents for more information:lowercase Lowercase type denotes eith

Seite 79 - 4.7.2 Fatal Errors

ISQL and Tools4-10 FairCom Corporation

Seite 80 - 4-10 FairCom Corporation

FairCom Corporation 5-1Chapter 5Data Unload Utility: dbdump5.1 INTRODUCTIONThis chapter describes the c-treeSQL database dump utility, dbdump.dbdump

Seite 81 - Data Unload Utility: dbdump

ISQL and Tools5-2 FairCom Corporation• SELECT privileges on the tables named in the commands file5.3 DBDUMP COMMAND LINE SYNTAXThe dbdump command acce

Seite 82 - 5.5 THE COMMANDS FILE

Data Unload Utility: dbdumpFairCom Corporation 5-3The syntax definition for the commands file is as shown:dbdump_commands: define_record_statement

Seite 83

ISQL and Tools5-4 FairCom Corporation• record_length is the length of the fixed length record. This length should include the length of field or recor

Seite 84 - 5.6 EXAMPLES

Data Unload Utility: dbdumpFairCom Corporation 5-5 ( no, name, loc ) FIELD DELIMITER ' ' ;FOR RECORD dept_rec DUMP INTO deptrecs_out

Seite 85

ISQL and Tools5-6 FairCom Corporation

Seite 86 - 5-6 FairCom Corporation

FairCom Corporation 6-1Chapter 6Schema Export Utility: dbschema6.1 INTRODUCTIONThis chapter describes the c-treeSQL utility, dbschema. This utility re

Seite 87 - Chapter 6

ISQL and Tools6-2 FairCom Corporationagainst a corresponding user name before it connects to the database. If omitted, the default value depends on th

Seite 88 - 6.2 EXAMPLES

Schema Export Utility: dbschemaFairCom Corporation 6-3ADMIN@isis% dbschema -t dbp1,test_view rdsdbDBSCHEMAcreate table ADMIN.dbp1 ( c1 int

Seite 89

FairCom Corporation 1-1Chapter 1Introduction1.1 OVERVIEWInteractive SQL (often referred to throughout this manual as ISQL) is a utility supplied with

Seite 90 - 6-4 FairCom Corporation

ISQL and Tools6-4 FairCom Corporation

Seite 91 - Appendix A

FairCom Corporation A-1Appendix ATutorial Source CodeA.1 INTRODUCTORY TUTORIALCREATE TABLE CUSTMAST ( cm_custnum VARCHAR(5), cm_zip VARC

Seite 92 - A-2 FairCom Corporation

ISQL and ToolsA-2 FairCom Corporation oi_itemnum VARCHAR(6) );CREATE INDEX orderitem ON orderitems (oi_ordernum, oi_seqnumber);CREATE TABLE itemmas

Seite 93 - A.3 LOCKING TUTORIAL

Tutorial Source CodeFairCom Corporation A-3COLUMN oi_quantity FORMAT "A10" heading "QTY"COLUMN im_price FORMAT "$99.99"

Seite 94 - A-4 FairCom Corporation

ISQL and ToolsA-4 FairCom Corporation im_desc VARCHAR(48));CREATE TABLE custmast ( cm_custnum VARCHAR(5), cm_zip VARCHAR(10), cm_st

Seite 95 - FairCom Corporation A-5

Tutorial Source CodeFairCom Corporation A-5ROLLBACK WORK;INSERT INTO orderitems VALUES ('3', 1, 2, '3');INSERT INTO orderitems VA

Seite 96 - A-6 FairCom Corporation

ISQL and ToolsA-6 FairCom Corporation

Seite 97

FairCom Corporation Index-iIndexSymbols@Execute syntax . . . . . . . . . . . . . . . . . . . . .3-12AAdding titles . . . . . . . . . . . . . . . . .

Seite 98

ISQL and ToolsIndex-ii FairCom CorporationFormatting ISQL output . . . . . . . . . . . . . . . . .3-3GGET statement . . . . . . . . . . . . . . . . .

Seite 99

IndexIndex-iii FairCom CorporationCOMPUTE . . . . . . . . . . . . . . 3-4, 3-7, 3-21COMPUTE syntax . . . . . . . . . . . . . . . .3-21DEFINE . . .

Kommentare zu diesen Handbüchern

Keine Kommentare