RE: Error when generating insert statements

John Dorlon <[email protected]> Fri, 7 Dec 2012 14:48:07 +0000
Newsgroups gmane.comp.db.oracle.toad.free
Message-ID <4120B436C765EC43A31CC3E2A13D36A6263909F2@ALVMBXW02.prod.quest.corp>
Hi Volker,

  What version of Toad are you using?

  Would you be able to export this table and email the export file to me?

-John

From: [email protected] [mailto:[email protected]] On Behalf Of Volker Siebelink
Sent: Friday, December 07, 2012 5:35 AM
To: [email protected]
Subject: [toad] Error when generating insert statements

Hello,

I have this table:

[cid:[email protected]]

Note that column ENEX is of type char(2). When generating insert statements for this table, I get:

Insert into T_GTE
   (EZPT, CREATOR, AEZPT, CHANGER, TAG,
    ETSOEIC_CODE, ENEX, VVON, VBIS, LAST_EXPORT_DATE,
    LAST_EXPORTED_DATE, CONFIDENTIAL, CONFIRMED)
 Values
   (TO_DATE('12/05/2012 14:15:52', 'MM/DD/YYYY HH24:MI:SS'), 'TED', TO_DATE('12/06/2012 08:08:14', 'MM/DD/YYYY HH24:MI:SS'), 'TED', '001.TOAST__H018___.LAS.A.D.WM__.RW.H',
    '37Z000000004972G', 'EX ', TO_DATE('04/01/2007 06:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/2999 06:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/06/2012 10:46:08', 'MM/DD/YYYY HH24:MI:SS'),
    TO_TIMESTAMP_TZ('01.02.2012 07:00:00, -01:00','DD.MM.YYYY HH24:MI:SS,FF TZH:TZM'), 0, -1);

Here we have two errors:

  1.  The value to be inserted into column ENEX is 'EX ', which has 3 characters.
  2.  The expression for the timestamp is wrong. It should be "TO_TIMESTAMP_TZ('01.02.2012 07:00:00 -01:00','DD.MM.YYYY HH24:MI:SS TZH:TZM')"
  3.  when exporting more than 50 row, the ',' in the format string of the timestamp changes to '.'.

So, after generating insert statements the output has to be edited each time. This is quite annoying when the output file is more than 50MB in size :-(

I use TOAD 11.6.0.43.

Regards,
Volker



--

Volker Siebelink        | phone:  +49 291 9985-20

MEGLA GmbH              | fax:    +49 291 9985-51

Feldstraße 34           | mailto: [email protected]<mailto:[email protected]>

D-59872 Meschede        | URL:    http://www.megla.de



Geschäftsführer        Dipl.-Ing. Volker Siebelink

Firmensitz/

Registergericht        Meschede, Amtsgericht Arnsberg, HRB 3288

Umsatzsteuer-

Identifikationsnummer  DE 125917642
image001.png (image/png, 14.1 KB) - not displayed