Skip Menu |

This queue is for tickets about the SQL-Translator CPAN distribution.

Report information
The Basics
Id: 3247
Status: resolved
Priority: 0/
Queue: SQL-Translator

People
Owner: kclark [...] cpan.org
Requestors: a.sigel [...] teckpro.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: "Alexander Sigel" <a.sigel [...] teckpro.de>
To: <bug-sql-translator [...] rt.cpan.org>
CC: <a.sigel [...] teckpro.de>
Subject: 1. Missing ora_data_type dec(imal) in: SQL::Translator::Parser::Oracle.pm: fixed | 2. Oracle-->Oracle does not work | 3. Create+alter constraints not in grammar
Date: Fri, 15 Aug 2003 09:18:04 +0200
Thanks for your very useful SQL-Fairy, in general it "works like a charm". However, I have the following patch and two questions: 1. Missing ora_data_type dec(imal) in: SQL::Translator::Parser::Oracle.pm: fixed ---------------------------------------------------------------------------- ---- In SQL::Translator::Parser::Oracle.pm I noticed that Oracle 9i SQL CREATE statements containing decimal data types like: SOME_COLUMN DEC(10,2) make the Oracle-Parser-Grammar fail and thus the corresponding table is missing from the producers' output. Therefore, I added in: ora_data_type : /n?dec/i { $return = 'decimal' } | 2. Oracle-->Oracle does not work -------------------------------- In addition, I did not get Oracle (parser) --> Oracle (producer) to work for test purposes. Did anyone get it to work with a fairly complete Oracle test DDL? 3. Create+alter constraints not in grammar ------------------------------------------ Given the following create+alter statement for a table, the parser fails: CREATE TABLE AD_AGT ( AGENTUR_ART NUMBER(10) NOT NULL, AGENTUR_NUMMER NUMBER(10), WIESB_VEREING_KZ VARCHAR2(12), MITARB_INNEN_ANZ NUMBER(2), MITARB_AUSSEN_ANZ NUMBER(3), AD_AGT_ID NUMBER(10) NOT NULL, PARTNER_ID NUMBER(10), KFZ_KZ_ID NUMBER(10), CONSTRAINT AD_AGT_PK PRIMARY KEY ( AD_AGT_ID ) ENABLE VALIDATE ); ALTER TABLE AD_AGT ADD ( CONSTRAINT AD_AGT_FK_2 FOREIGN KEY ( KFZ_KZ_ID ) REFERENCES KFZ_KZ ( KFZ_KZ_ID ) ENABLE VALIDATE ); etc. However, it works if the definition is in the create statement, so I use this workaround. CREATE TABLE AD_AGT ( AGENTUR_ART NUMBER(10) NOT NULL, AGENTUR_NUMMER NUMBER(10), WIESB_VEREING_KZ VARCHAR2(12), MITARB_INNEN_ANZ NUMBER(2), MITARB_AUSSEN_ANZ NUMBER(3), AD_AGT_ID NUMBER(10) NOT NULL, PARTNER_ID NUMBER(10), KFZ_KZ_ID NUMBER(10), CONSTRAINT AD_AGT_PK PRIMARY KEY ( AD_AGT_ID ), CONSTRAINT AD_AGT_FK_1 FOREIGN KEY ( PARTNER_ID ) REFERENCES PARTNER ( PARTNER_ID ), CONSTRAINT AD_AGT_FK_2 FOREIGN KEY ( KFZ_KZ_ID ) REFERENCES KFZ_KZ ( KFZ_KZ_ID ) ); It would be nice to change the Oracle grammar correspondingly. Regards, Alex -- Alexander Sigel, M.A. -- Wissensmanager / Fachberater KM -- teckpro AG (www.teckpro.de) Niederlassung Köln: Odenwaldstr. 72, 51105 Köln (-Humboldt-Gremberg) Tel./Fax: 0221/8025543, Mobil 0178/3504515 a.sigel@teckpro.de -- Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren dieser E-Mail oder die unbefugte Weitergabe der enthaltenenen Informationen ist nicht gestattet. The information contained in this message is confidential or protected by law. If you are not the intended recipient, please contact the sender and delete this message. Any unauthorised copying of this message or unauthorised distribution of the information
From: cpanspam [...] netebb.com
[a.sigel@teckpro.de - Fri Aug 15 03:20:38 2003]: Show quoted text
> > Therefore, I added in: > ora_data_type : > > /n?dec/i { $return = 'decimal' } > |
This patch has been applied. Thanks for your help. -Ross Smith
Fixed since.