- 论坛徽章:
- 0
|
$ db2level
DB21085I Instance "fexuser" uses "64" bits and DB2 code release "SQL08020"
with level identifier "03010106".
Informational tokens are "DB2 v8.1.1.64", "s040812", "U498350", and FixPak "7".
Product is installed at "/usr/opt/db2_08_01".
$
$ cat 8.sql
CREATE PROCEDURE get_datetime (out cdate date, out ctime time )
P1: BEGIN
VALUES CURRENT DATE INTO cdate;
VALUES CURRENT TIME INTO ctime;
END P1;
$
$ db2 -tvf 8.sql
CREATE PROCEDURE get_datetime (out cdate date, out ctime time )
P1: BEGIN
VALUES CURRENT DATE INTO cdate
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 "END-OF-STATEMENT" was found following "RENT
DATE INTO cdate". Expected tokens may include: "<psm_semicolon>". LINE
NUMBER=3. SQLSTATE=42601
VALUES CURRENT TIME INTO ctime
SQL0104N An unexpected token "CTIME" was found following "". Expected tokens
may include: "". SQLSTATE=42601
END P1
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 "END-OF-STATEMENT" was found following "END P1".
Expected tokens may include: "JOIN <joined_table>". SQLSTATE=42601
$ |
|