IBM 000-8697 Bedienungsanleitung Seite 507

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 702
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 506
Utilities 7-29
How to Create a Command File
The restrictions dbload imposes on the VALUES clause value list affect only
data types DATE, DATETIME, andINTERVAL.Values of type DATE must be in
mm/dd/yyyy format. (This is the case if the DBDATE environment variable is
set to its default value, MDY4/.) Data for DATETIME and INTERVAL columns
must be in character form, showing only field digits and delimiters (no type
or qualifiers).
Inserted data types correspond to the explicit or default column list. If the
data field width is different from its corresponding character column width,
the data is made to fit. That is, inserted values are padded with blanks if the
data is not wide enough for the column, or are truncated if the data is too
wide for the column.
If the number of columnsnamed isfewer thanthe number of columns in the
table, dbload insertsthedefault value specifiedfor the unnamedcolumns.If
no default is specified, dbload attempts to insert a null value. If the attempt
violatesa NOT NULL restrictionor a uniqueconstraint,theinsert fails andan
error message is returned.
If the INSERT statement omits the column name(s), the default INSERT speci-
ficationiseverycolumninthenamedtable.IftheINSERTstatementomitsthe
VALUES clause,thedefault INSERT specificationis every fieldoftheprevious
FILE statement.
Anerrorresultsifthenumberofcolumnnameslisted(orimpliedbydefault)
does not match the number of values listed (or implied by default).
Character-Position Statement Examples
The first FILE and INSERT statement set in the character-position example on
page 7-26 is repeated here:
FILE cust_loc_data
(city 1-15,
state 16-17,
area_cd 23-25 NULL = "xxx",
phone 23-34 NULL = "xxx-xxx-xxxx",
zip 18-22,
state_area 16-17 : 23-25);
INSERT INTO cust_address (col1, col3, col4)
VALUES (city, state, zip);
Seitenansicht 506
1 2 ... 502 503 504 505 506 507 508 509 510 511 512 ... 701 702

Kommentare zu diesen Handbüchern

Keine Kommentare