初学者创建分区表报错
求帮助:不知道是哪里错了。
我用Oracle VM VirtualBox虚拟机装了Red Hat linux 和 DB2 v10.5。
然后执行:
[db2inst2@James ~]$ db2sampl -name Petter
[db2inst1@James ~]$ db2 connect to petter
[db2inst1@James ~]$ db2
然后在db2下创建分区表的时候报错,是哪一步错了?
db2 =>CREATE TABLE lineitem
(
l_orderkey DECIMAL(10,0) NOT NULL,
l_partkey INTEGER,
l_suppkey INTEGER,
l_linenumber INTEGER,
l_quantity DECIMAL(12,2),
l_extendedprice DECIMAL(12,2),
l_discount DECIMAL(12,2),
l_tax DECIMAL(12,2),
l_returnflag CHAR(1),
l_linestatus CHAR(1),
l_shipdate DATE,
l_commitdate DATE,
l_receiptdate DATE,
l_shipinstruct CHAR(25),
l_shipmode CHAR(10),
l_comment VARCHAR(44)
) PARTITION BY RANGE(l_shipdate)
( starting minvalue,
PART JAN1992 STARTING '1992-01-01' ENDING '1992-06-30',
PART JAN1993 STARTING '1992-07-01' ENDING '1992-12-31',
PART JAN1994 STARTING '1993-01-01' ENDING '1993-06-30',
PART JAN1995 STARTING '1993-07-01' ENDING '1993-12-31',
ending maxvalue );DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "maCREATE" was found following "ending ".
Expected tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "(" was found following "BEGIN-OF-STATEMENT".
Expected tokens may include: "". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "l_orderkey DECIMAL" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "".
SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "INTEGER" was found following "l_partkey
". Expected tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "INTEGER" was found following "l_suppkey
". Expected tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "INTEGER" was found following "l_linenumber
". Expected tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "l_quantity DECIMAL" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "".
SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "l_extendedprice DECIMAL" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "".
SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "l_discount DECIMAL" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "".
SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "l_tax DECIMAL" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "".
SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "l_returnflag CHAR" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "".
SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "l_linestatus CHAR" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "".
SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "DATE" was found following "l_shipdate ".
Expected tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "DATE" was found following "l_commitdate ".
Expected tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "DATE" was found following "l_receiptdate ".
Expected tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "l_shipinstruct CHAR" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "".
SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "l_shipmode CHAR" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "".
SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "l_comment VARCHAR" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "".
SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token ")" was found following "BEGIN-OF-STATEMENT".
Expected tokens may include: "". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "minvalue" was found following "( starting ".
Expected tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "JAN1992" was found following "PART ". Expected
tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "JAN1993" was found following "PART ". Expected
tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "JAN1994" was found following "PART ". Expected
tokens may include: "JOIN ". SQLSTATE=42601
db2 => DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "JAN1995" was found following "PART ". Expected
tokens may include: "JOIN ". SQLSTATE=42601