|
-
what is wrong with this sql statement? help!
I am new to DB2, used MS Sql before. Can someone help me understand the difference
of the below 2 sql statements? The one in multiple lines won't work, but
the one in one line works! Does DB2 SQL has to be written in one line only?
What if I have a lot of fields in this table? Thank you for your help.
CREATE TABLE TEST1(ROOT VARCHAR(10), LOCATION VARCHAR(4))
vs.
CREATE TABLE TEST1
(ROOT VARCHAR(10),
LOCATION VARCHAR(4))
----------------------------------------------------------
The error message for the multi-line statement is below:
---------------------------------------------------------
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 "TABLE" was found following "CREATE ". Expected
tokens may include: "TYPE". SQLSTATE=42601
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 "ROOT VARCHAR" was found following "(".
Expected tokens may include: "<values>". SQLSTATE=42601
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 "LOCATION VARCHAR" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "<values>".
SQLSTATE=42601
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks