Re: Speaking of New Features

  • From: Jack van Zanen <jack@xxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Sun, 13 Sep 2009 01:24:53 +1000

I always suggest to query exactly what you want. You leave yourself open for
all sorts of funny stuff if columns get added and your inserts start failing
because the query assumes a certain number of columns. All your proposed
mods are variations on this.

It may be a pain, but in the long run it saves you headaches, I'm sure




Jack van Zanen

-------------------------
This e-mail and any attachments may contain confidential material for the
sole use of the intended recipient. If you are not the intended recipient,
please be aware that any disclosure, copying, distribution or use of this
e-mail or any attachment is prohibited. If you have received this e-mail in
error, please contact the sender and delete all copies.
Thank you for your cooperation


2009/9/13 Ahbaid Gaffoor <ahbaid@xxxxxxx>

> Chet, I like it. Building on your suggestion:
>
> What I'd also like to see is the following additions to the SELECT
> statement
>
> --
> -- Select all columns except those listed
> --
> SELECT * EXCEPT ATTR_005, ATTR_007 from my_table;
>
> --
> -- Select columns that match an expression
> --
> SELECT * WHERE COLUMNS LIKE 'ATTR%' OR 'DATE%' from my_table;
>
>
> In tables with hundres of columns named ATTR_001 thru ATTR_500 it is really
> painful to write a select for all but the last two columns.
>
> regards
> Ahbaid
>
> chet justice 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>
>>
>>
> --
> //www.freelists.org/webpage/oracle-l
>
>
>

Other related posts: