Discussion:
Error when generating insert statements
Volker Siebelink
2012-12-07 11:34:52 UTC
Permalink
Hello,

I have this table:



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: ***@megla.de
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
John Dorlon
2012-12-07 14:48:07 UTC
Permalink
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: ***@yahoogroups.com [mailto:***@yahoogroups.com] On Behalf Of Volker Siebelink
Sent: Friday, December 07, 2012 5:35 AM
To: ***@yahoogroups.com
Subject: [toad] Error when generating insert statements

Hello,

I have this table:

[cid:***@01CDD457.96DBC180]

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: ***@megla.de<mailto:***@megla.de>

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
Volker Siebelink
2012-12-07 15:07:45 UTC
Permalink
Hi John,

I'm on 11.6.0.43. I'll send you the export file.

Regards,
Volker
Post by John Dorlon
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
Of *Volker Siebelink
*Sent:* Friday, December 07, 2012 5:35 AM
*Subject:* [toad] Error when generating insert statements
Hello,
Note that column ENEX is of type char(2). When generating insert
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);
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
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
--
Volker Siebelink | phone: +49 291 9985-20
MEGLA GmbH | fax: +49 291 9985-51
Feldstraße 34 | mailto: ***@megla.de
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
Loading...