HP (Hewlett-Packard) c-tree-SQL ISQL and Tool reference Guide Printer User Manual


 
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-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).
Table 3-4: Date-Time Format Strings for the COLUMN Statement
Character Description