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.
CODE:
OPEN TableCursor;
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 '
CONCAT ')';
EXECUTE IMMEDIATE dyn_stmt;
END WHILE;
CLOSE TableCursor;
Any help will be highly appreciated.
