Search the web
Sign In
New User? Sign Up
toad · Self Help List for TOAD Development Users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
ER: Add column name comments when Export Dataset as Inserts   Message List  
Reply | Forward Message #47965 of 49384 |
Re: ER: Add column name comments when Export Dataset as Inserts

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
> > > >
> > >
> >
>





Sat Jul 4, 2009 3:17 am

r_squires
Offline Offline
Send Email Send Email

Forward
Message #47965 of 49384 |
Expand Messages Author Sort by Date

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...
Richard Squires
r_squires
Offline Send Email
Jun 11, 2009
8:31 am

Great idea. Simple and helpful. From: toad@yahoogroups.com [mailto:toad@yahoogroups.com] On Behalf Of Richard Squires Sent: Thursday, June 11, 2009 12:12 AM ...
John Dorlon
jdorlon3
Offline Send Email
Jun 23, 2009
10:08 pm

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:...
John Dorlon
jdorlon3
Offline Send Email
Jun 24, 2009
2:23 pm

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?...
Richard Squires
r_squires
Offline Send Email
Jun 24, 2009
11:09 pm

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) ...
Richard Squires
r_squires
Offline Send Email
Jun 27, 2009
4:35 pm

Do you have a preference of INSERT INTO (COLUMNA,COLUMNB) VALUES ( 'VALUEA', -- COLUMNA 'VALUEB') - COLUMNB Over INSERT INTO (COLUMNA,COLUMNB) VALUES ( ...
John Dorlon
jdorlon3
Offline Send Email
Jun 29, 2009
3:07 pm

Yep, the latter would be fine, it's the separate line I'm most interested in....
Richard Squires
r_squires
Offline Send Email
Jun 29, 2009
10:19 pm

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...
Richard Squires
r_squires
Offline Send Email
Jul 4, 2009
11:05 am

This should be fixed next beta. From: toad@yahoogroups.com [mailto:toad@yahoogroups.com] On Behalf Of Richard Squires Sent: Friday, July 03, 2009 10:17 PM To:...
John Dorlon
jdorlon3
Offline Send Email
Jul 20, 2009
9:21 pm

5. An extra comma after the last column name above the VALUES part of the INSERT statement. May have something to do with the last column having a NULL value...
Richard Squires
r_squires
Offline Send Email
Jul 21, 2009
9:47 am

Beta 10.0.0.12: 1. If I include NULLs I don't get the column name comments next to them (I have "One column value per line" checked) 2. "Export Selected...
Richard Squires
r_squires
Offline Send Email
Jul 21, 2009
9:47 am

Funny, I just fixed some of these last night! 1) and 3). I'll check on the other two this morning. From: toad@yahoogroups.com...
John Dorlon
jdorlon3
Offline Send Email
Jul 21, 2009
1:14 pm

OK, everything should be fixed for next beta. Plus I added an option for "set define off" that some of you were asking for. From: toad@yahoogroups.com...
John Dorlon
jdorlon3
Offline Send Email
Jul 21, 2009
2:08 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help