Toad World® Forums

Script generation bug [1 Attachment]


#1

[ Attachment(s) from David Hicken included below]

After creating a table that has foreign keys, triggers, primary keys, unique
keys, etc., when I click on the script tab in Schema Browser, the SQL command
for creating PK will not run.

for instance:

<>

PROMPT Non-FOREIGN KEY CONSTRAINTS ON TABLE CARD_TRAN_INFO;
ALTER TABLE SWITCH.CARD_TRAN_INFO ADD ( CONSTRAINT PK_CARD_TRAN_INFO PRIMARY KEY
(CARD_NUMBER, SITE_CODE, INVOICE_NUMBER, TRAN_DTS, ORIGIN) USING INDEX
SWITCH.PK_CARD_TRAN_INFO)
/

ALTER TABLE SWITCH.CARD_TRAN_INFO ADD ( CONSTRAINT PK_CARD_TRAN_INFO PRIMARY KEY
(CARD_NUMBER, SITE_CODE, INVOICE_NUMBER, TRAN_DTS, ORIGIN) USING INDEX
SWITCH.PK_CARD_TRAN_INFO)
Error at line 2
ORA-00907: missing right parenthesis

Doesn’t matter if I user F9 or F5.

Checked if it just complex keys or simple keys make a difference and that
doesn’t seem to matter.

This is what my parameter screen looks like (attached).

David Hicken
utahtoad at gmail dot org

Attachment(s) from David Hicken

1 of 1 Photo(s)

screen1.JPG


#2

Forgot to say:

Oracle RDBMS 11.1.0.7
Oracle Client 11.1.0
Toad 10.6.0.42

But I think I saw this before the most recent upgrade, and it is also manifest in other Oracle versions.

DH


#3

Hi David,

The command is right, but it looks like the schema name “SWITCH”
needs to be double quoted. I’ll fix it.

-John