HP c-tree-SQL ISQL and Tools manual Null ? Type Length Colname, Not Null INT, Char

Page 45

 

 

ISQL Statements

 

 

 

 

Table 3-4: Date-Time Format Strings for the COLUMN Statement

 

 

 

 

Character

Description

 

 

 

 

W

The week of month as a 1-digit number (in the range 1-5).

 

 

 

 

DDD

The day of year as a 3-digit number (in the range 001-365).

 

 

 

 

DD

The day of month as a 2-digit number (in the range 01-31).

 

 

 

 

D

The day of week as a 1-digit number (in the range 1-7, 1 for Sunday and

 

 

7 for Saturday).

 

 

 

 

DAY

The day of week as a 9 character string (in the range 'SUNDAY' to 'SAT-

 

 

URDAY '.

 

 

 

 

DY

The day of week as a 3 character string (in the range 'SUN' to 'SAT').

 

 

 

 

J

The Julian day (number of days since DEC 31, 1899) as an 8 digit num-

 

 

ber.

 

 

 

 

TH

When added to a format keyword that results in a number, this format

 

 

keyword ('TH') is replaced by the string 'ST', 'ND', 'RD' or 'TH' depending

 

 

on the last digit of the number.

 

 

 

 

AMPM

The string 'AM' or 'PM' depending on whether time corresponds to fore-

 

 

noon or afternoon.

 

 

 

 

A.M.P.M.

The string 'A.M.' or 'P.M.' depending on whether time corresponds to

 

 

forenoon or afternoon.

 

 

 

 

HH12

The hour value as a 2-digit number (in the range 00 to 11).

 

 

 

 

HHHH24

The hour value as a 2-digit number (in the range 00 to 23).

 

 

 

 

MI

The minute value as a 2-digit number (in the range 00 to 59).

 

 

 

 

SS

The seconds value as a 2-digit number (in the range 00 to 59).

 

 

 

 

SSSSS

The seconds from midnight as a 5-digit number (in the range 00000 to

 

 

86399).

 

 

 

 

MLS

The milliseconds value as a 3-digit number (in the range 000 to 999).

 

 

 

Examples

The following examples are based on a table, orders, with columns defined as follows:

ISQL> table orders

NULL ?

TYPE

LENGTH

COLNAME

-------

------

----

------

order_id

NOT NULL

INT

4

customer_id

 

INT

4

steel_type

 

CHAR

20

FairCom Corporation

3-19

Image 45
Contents For use with c-treeSQL Server Isql and Tools Reference GuidePage Table of Contents Data Load Utility dbload Iii Tutorial Source CodeFairCom Corporation Documentation Overview Syntax Diagram ConventionsPurpose of this Manual AudienceIsql and Tools Related DocumentationOverview IntroductionIsql and Tools FairCom Corporation Introductory Tutorial Quick TourInit IsqlManage DefineIsql Create Table Custmast Isql Commit Work CustmastDone Complete Introductory Tutorial CodeQuick Tour ISQLTutorial2.sql Relational Model and Indexing TutorialQuick Tour Insert Into Values Insert IntoValues QTY Price Commit WorkComplete Relational Model and Indexing Tutorial Source Code ISQLTutorial3.sql Locking Tutorial@ISQL @iSQLTutorial3.sql Isql Delete from Custmast Complete Locking Tutorial Source Code ISQLTutorial4.sql Transaction Processing TutorialTransaction Rollback Work Complete Transaction Processing Tutorial Source Code Starting Interactive SQL Isql StatementsSyntax ArgumentsStatement History Support PasswordUsername ConnectstringIsql Statements Formatting Output of Isql QueriesIsql Statements for Statement History Support Statement SummaryDisplay Isql Statements for Query Formatting SummaryCustomername Customercity Orderid Ordervalue Example 3-1 Unformatted Query Display from IsqlExample 3-2 Controlling Display Width of Character Columns Formatting Column Display with the Column StatementExample 3-3 Customizing Format of Numeric Column Displays OrdervalueCustomername Customercity Example 3-4 Specifying Column Breaks and Values with Display Numorders Customername Example 3-6 Specifying a Query Header and Footer with Title Transaction Support Help and Table Statements1 @ Execute Syntax Isql ReferenceDescription ExampleBreakspec Break SyntaxExamples Skip nCustomername History Clear SyntaxColumn Syntax ArgumentOption Break Column Compute Display TitleColumnname Format formatstringHeading headingtext Character Description Date-Time Format Strings for the Column StatementNull ? Type Length Colname Not Null INTChar Orderinfo AmountSysdate Column Title FLDNEW Title ComputeVariablename AVG MAX MIN SUM CountValue Define SyntaxDisplayvalue ColpositionCOL columnnumber @columnnameEdit Syntax Exit or Quit Syntax Related StatementsExit Isql GET query.sql 10 GET SyntaxIsql RUN Help Syntax Help CommandsclausesHistory Syntax Orderstate LotlocationFollowing example illustrates usage of the History statement Hostcommand Host or SH or SyntaxFrom List Syntax 16 RUN Syntax Quit or Exit SyntaxQuit Isql History18 SET Syntax Save SyntaxPagesize LinesizePagesize numberlines Transaction Isolation Level isolationlevel Connection databasename DefaultIsql Break on Isql Select TBL from Systables TBL TBLShow Syntax Spool Syntax Is Default ?Filename on Database ConnectionsArgument … Start SyntaxIsql Spool STK on Isql Spool OFFNot Null Varchar Null ? Type Length Colname Not Null INTTablename Type Length Colname Null ?Date Left Center Right COL n Title SyntaxText DoubleIsql Clear Title Isql and Tools FairCom Corporation Introduction Data Load Utility dbloadCommandsfile Dbload Command Line SyntaxPrerequisites for Dbload OptionsData Load Utility dbload Data File FormatsVariable Length Records Commands FileFixed Length Records Next RecordChar Short Long Float Double Define Record StatementNull For Each StatementExamples Example 4-1 Sample dbload commands filesCompilation Errors Record name redefinedPosition not specified for fixed length record Fatal Errors Isql and Tools FairCom Corporation Prerequisites for Dbdump Data Unload Utility dbdumpDbdump Command Line Syntax Short Long Float Double Data Unload Utility dbdumpFor Record Statement Define Record custrec of Fixed Length 37 AS Isql and Tools FairCom Corporation Schema Export Utility dbschema Outfile Username.procedurenameUsername.tablename Username.triggernameDbschema Schema Export Utility dbschemaImport Begin ENDIsql and Tools FairCom Corporation Commit Work Select * from Custmast Delete from Custmast Tutorial Source CodeInteger MoneyVARCHAR6 Commit Work Delete from Custmast Tutorial Source CodeImdesc VARCHAR48 Select * from orderlist Select * from orderitems Isql and Tools FairCom Corporation Index-i SymbolsIndex-ii FairCom Corporation IsqlIndex-iii FairCom Corporation Index