Re: Speaking of New Features

From: Daniel Fink <daniel.fink_at_optimaldba.com>
Date: Thu, 10 Sep 2009 12:38:22 -0600
Message-ID: <4AA9479E.8080602_at_optimaldba.com>



In the absence of actual implementation, comments are your friend. Why not use comments to indicate which column you are referencing? Granted it does not totally address the situation of specifying a limited number of columns or and independent order, but it would help when inserting 100 columns or so.

Pre-column
DEMO_at_dwf10gr2> insert into t2
  2 values ( /* c1 */ 12,

  3           /* c2 */ 42
  4         )

  5 /

1 row created.

Post-column
DEMO_at_dwf10gr2> insert into t2
  2 values ( 12, -- c1

  3           42   -- c2
  4*        )

DEMO_at_dwf10gr2> /

1 row created.

Regards,
Daniel Fink

-- 
Daniel Fink

OptimalDBA    http://www.optimaldba.com
Oracle Blog   http://optimaldba.blogspot.com

Lost Data?    http://www.ora600.be/





chet justice wrote:

>
> I think I would require the use of the correct column name instead
> of any type of positional col-n style labeling.
>
>
> Agreed. That was just an example, those are the actual column names.
>
> On Thu, Sep 10, 2009 at 1:47 PM, Powell, Mark D <mark.powell_at_eds.com
> <mailto:mark.powell_at_eds.com>> wrote:
>
> Well, the suggested syntax below would make matching up a long
> column list to the provided values/variables a lot easier and
> would likely help prevent listing 100 columns to be inserted but
> only including 99 variables in the values list. I think I would
> require the use of the correct column name instead of any type of
> positional col-n style labeling.
>
> -- Mark D Powell --
> Phone (313) 592-5148
>
>
> ------------------------------------------------------------------------
> *From:* oracle-l-bounce_at_freelists.org
> <mailto:oracle-l-bounce_at_freelists.org>
> [mailto:oracle-l-bounce_at_freelists.org
> <mailto:oracle-l-bounce_at_freelists.org>] *On Behalf Of *Jared Still
> *Sent:* Thursday, September 10, 2009 12:04 PM
>
> *To:* chet.justice_at_gmail.com <mailto:chet.justice_at_gmail.com>
> *Cc:* oracle-l
> *Subject:* Re: Speaking of New Features
>
> Very Perlish.
>
> I like it. :)
>
> Jared Still
> Certifiable Oracle DBA and Part Time Perl Evangelist
>
>
>
> On Wed, Sep 9, 2009 at 6:37 PM, chet justice
> <chet.justice_at_gmail.com <mailto:chet.justice_at_gmail.com>> wrote:
>
> Any thoughts on the "new" syntax for INSERT statements below?
>
> INSERT INTO my_table
> ( id => seq.nexval,
> create_date => SYSDATE,
> update_date => SYSDATE,
> col1 => 'A',
> col2 => 'SOMETHING',
> col3 => 'SOMETHING',
> col4 => 'SOMETHING',
> col5 => 'SOMETHING',
> col6 => 'SOMETHING',
> col7 => 'SOMETHING',
> col8 => 'SOMETHING',
> col9 => 'SOMETHING',
> col10 => 'SOMETHING',
> col11 => 'SOMETHING',
> col12 => 'SOMETHING',
> col13 => 'SOMETHING',
> col14 => 'SOMETHING' );
>
> Thought of one day while trying to clean up (make human
> readable) someone else's code. I would either get too
> many values or not enough. After copying the INSERT
> columns and subsequent VALUES clause into an Excel
> spreadsheet to compare them side by side, I thought, hey,
> what about named notation?
>
> Anyway, I created the "Idea" on Oracle Mix here
> <https://mix.oracle.com/ideas/94278-position-insert-syntax>
> if you are inclined to, one way or another, to vote.
>
> chet
>
> --
> chet justice
> www.oraclenerd.com <http://www.oraclenerd.com>
>
>
>
>
>
> --
> chet justice
> www.oraclenerd.com <http://www.oraclenerd.com>
>
-- http://www.freelists.org/webpage/oracle-l
Received on Thu Sep 10 2009 - 13:38:22 CDT

Original text of this message