Unanswered: Error when dynamically creating a table
Hi, I am trying to create a table in db2 , but i get this error: SQLCODE: -601, SQLSTATE: 42710 - The name of the object to be created is identical to the existing name "Clients.Systems" , and that table doesnt exist at all, here is the code: Any help will be highly appreciated.
WHILE (Done = 0) DO
FETCH TableCursor INTO TableName;
SET dyn_stmt = 'CREATE TABLE ' CONCAT '"' CONCAT SchemaName CONCAT '"' CONCAT '.'
CONCAT '"' CONCAT TableName CONCAT '" ('
CONCAT '"systemID" INTEGER WITH DEFAULT NULL, '
CONCAT '"sytemname" VARCHAR(200) WITH DEFAULT NULL, '
CONCAT '"SystemCreatedDate" TimeStamp '
EXECUTE IMMEDIATE dyn_stmt;
is done initialized with another value somewhere - otherwise done is equal to 0 and the loop is always true...
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be