ahmed salah

ahmed salah

  • 1.1k
  • 523
  • 32.2k

when create table inside database using db2 i get error SQL0007N?

Oct 7 2023 7:33 PM

I work on db2 database . I get error when create table inside database but I don't know how to solve this error .

I create table from db2 command windows Administrator

text file TestTables.sql contain query need executed by db2 as below

Create TABLE books (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL , author VARCHAR(255)  NOT  NULL , title VARCHAR(255)   NOT  NULL , isbn INT  NULL , PRIMARY KEY(id));

what I try

db2 => tvf C:\Users\MBR\Desktop\TestTables.sql
DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.  During SQL processing it returned:
SQL0007N  The statement was not processed because a character that is not
supported in SQL statements was included in the SQL statement.  Invalid
character: "\".  Text preceding the invalid character: "tvf C:".
SQLSTATE=42601

so How to solve this error please ?


Answers (1)