Toad World® Forums

Alter table script bad delimiter

Good Morning,

I recently came across the functionality that TOAD will create alter scripts for you via the GUI (Right click on Table --> Alter table --> Change table settings) and an alter script is created.

It corrects pretty good! There is a small issue with it though. My script is 125 lines long right now and one of the statements has the wrong delimiter for an odd reason. I think its just a issues with how the script is created. I have changed my delimiter so # sign, but its using ; sign one line. Here is a screen shot from a code preview.

Code Preview.jpeg

Error Message:

Error.jpeg

I think this is a fairly easily fix; most likely an over site.

Thanks for all the hard work with TOAD!

Toad for DB2 Beta 6.3.0.232 (64 bit) - TOAD for Db2 z/OS

Thanks for the information - were you doing a single table alter or were you driving the object compare feature in generating your script?

What was column RECORD_ID defined as originally?

Single Table Alter.

It was a integer. Here is the entire DDL:

CREATE TABLE PURGE_LIST (

RECORD_ID INTEGER NOT NULL GENERATED ALWAYS
AS IDENTITY (START WITH 100000, INCREMENT BY 1, CACHE 20,
NO MINVALUE, NO MAXVALUE, NO CYCLE, NO ORDER),
PURGE_NAME VARCHAR(300) FOR SBCS DATA NOT NULL,
TABLE_NAME VARCHAR(300) FOR SBCS DATA NOT NULL,
SCHEMA_NAME VARCHAR(128) FOR SBCS DATA NOT NULL,
INDEX_NAME VARCHAR(300) FOR SBCS DATA NOT NULL,
WHERE_CLAUSE VARCHAR(500) FOR SBCS DATA NOT NULL,
MONTHS_OF_RETENTION INTEGER NOT NULL,
PURGE_TYPE CHARACTER(1) FOR SBCS DATA NOT NULL DEFAULT ‘D’,
CREATE_S TIMESTAMP NOT NULL WITH DEFAULT,
CREATE_BY VARCHAR(10) FOR SBCS DATA NOT NULL DEFAULT SESSION_USER,
END_S TIMESTAMP WITH DEFAULT NULL,
END_BY VARCHAR(10) FOR SBCS DATA WITH DEFAULT NULL,
UPDATE_S TIMESTAMP WITH DEFAULT NULL,
UPDATE_BY VARCHAR(10) FOR SBCS DATA WITH DEFAULT NULL
)

Thanks for the input Robert.

We have recreated this and have opened

TDB-3374 to track and fix this issue.

Thanks again,

Jeff