Just tried this in 10.0.0.7.
When Exporting Dataset as Inserts, checking/unchecking the 'Include Null Text'
option gives unusual results.
If we don't include NULL text then the formatiing doesn't quite work and if we
do include the null text then I'd like even the NULL entries to have comments to
the right if possible.
--- In toad@yahoogroups.com, "Richard Squires" <r_squires@...> wrote:
>
> Yep, the latter would be fine, it's the separate line I'm most interested in.
>
> --- In toad@yahoogroups.com, John Dorlon <john.dorlon@> wrote:
> >
> > Do you have a preference of
> >
> > INSERT INTO (COLUMNA,COLUMNB)
> > VALUES (
> > 'VALUEA', -- COLUMNA
> > 'VALUEB') - COLUMNB
> >
> > Over
> >
> > INSERT INTO (COLUMNA,COLUMNB)
> > VALUES (
> > 'VALUEA' /* COLUMNA */,
> > 'VALUEB' /* COLUMNB */ )
> >
> > Seems to me the latter would be preferable so you don't have to worry about
something getting accidentally commented if you remove line breaks
> >
> >
> > From: toad@yahoogroups.com [mailto:toad@yahoogroups.com] On Behalf Of
Richard Squires
> > Sent: Friday, June 26, 2009 7:03 PM
> > To: toad@yahoogroups.com
> > Subject: [toad] Re: ER: Add column name comments when Export Dataset as
Inserts
> >
> >
> >
> >
> >
> > OK, this is excellent, again, my only comment would be it would be nice to
be able to choose whether I wanted embedded comments
> >
> > INSERT INTO (COLUMNA,COLUMNB)
> > VALUES (/*COLUMNA*/ VALUEA, /*COLUMNB*/ VALUEB)
> >
> > or have the columns on separate lines:
> >
> > INSERT INTO (COLUMNA,COLUMNB)
> > VALUES (
> > 'VALUEA', -- COLUMNA
> > 'VALUEB') -- COLUMNB
> >
> > Currently Generate Statement has the comments on separate lines and Export
As Insert has embedded.
> >
> > I'd also prefer the embedded comments after the value but now I'm just being
picky. It's already going to be hugely useful.
> >
> > I also tried formatting the Exported Inserts as I have it set to have the
values on separate lines and I got:
> >
> > INSERT INTO (
> > COLUMNA,
> > COLUMNB)
> > VALUES (/*COLUMNA*/
> > 'VALUEA',
> > /*COLUMNB*/
> > 'VALUEB')
> >
> > I guess I need to play with the formatter a bit more - it might be a better
solution than trying to implement a format as part of the export.
> >
> > Regards
> >
> > Richard
> >
> > --- In toad@yahoogroups.com<mailto:toad%40yahoogroups.com>, "Richard
Squires" <r_squires@> wrote:
> > >
> > > Excellent, looking forward to trying this one. So will you also be able to
implement it as an option for Export Dataset as Insert Statements as well?
> > >
> > >
> > > --- In toad@yahoogroups.com<mailto:toad%40yahoogroups.com>, John Dorlon
<john.dorlon@> wrote:
> > > >
> > > > I did this for SB-Tables-'generate insert statement'. Read right past
the 'export dataset' part. I think it should be an option there.
> > > >
> > > > From: toad@yahoogroups.com<mailto:toad%40yahoogroups.com>
[mailto:toad@yahoogroups.com<mailto:toad%40yahoogroups.com>] On Behalf Of John
Dorlon
> > > > Sent: Tuesday, June 23, 2009 5:08 PM
> > > > To: toad@yahoogroups.com<mailto:toad%40yahoogroups.com>
> > > > Subject: RE: [toad] ER: Add column name comments when Export Dataset as
Inserts
> > > >
> > > >
> > > >
> > > >
> > > > Great idea. Simple and helpful.
> > > >
> > > > From: toad@yahoogroups.com<mailto:toad%40yahoogroups.com>
[mailto:toad@yahoogroups.com<mailto:toad%40yahoogroups.com>] On Behalf Of
Richard Squires
> > > > Sent: Thursday, June 11, 2009 12:12 AM
> > > > To: toad@yahoogroups.com<mailto:toad%40yahoogroups.com>
> > > > Subject: [toad] ER: Add column name comments when Export Dataset as
Inserts
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > I would sometimes find it useful to be able to export data (or Generate
Insert Statements) so that it includes the column name commented to the right of
the column values. Here is an example:
> > > >
> > > > INSERT my_table
> > > > (col_a,
> > > > col_b,
> > > > col_c)
> > > > VALUES
> > > > (, -- col_a
> > > > , -- col_b
> > > > ) -- col_c
> > > >
> > > > The reason this would be useful is that sometimes I find it difficult to
match up the value with column name (especially in large inserts) so in order to
try and determine where I need to make a change, or if I'm creating a new large
insert statement, I place comments to the right so that I can identify which
values match where.
> > > >
> > > > Other options:
> > > > 1. When in an INSERT highlight the column name when the cursor has focus
on the value.
> > > > 2. Have a formatting option that you can apply to an existing INSERT
that would add the comments.
> > > > 3. Use /* col_a */ so that you can have them all in-line
> > > >
> > > > I'd be just as happy with my first suggestion though.
> > > >
> > > > Richard
> > > >
> > >
> >
>