Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 18 Jul 2002 @ 13:33:58 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

Subj:   Re: The Optimizer and Multi Inlists
From:   Dieter Nöth

But I think your query alerts us to a deficiency in SQL. You can specify a single literal value or a list of values (corresponding to a column), but you cannot specify a list of values arranged in rows and columns. Since SQL is specifically meant for dealing with tables, this is a huge oversight.

This is called a "row value expression" and it's a part of SQL since SQL92, but i don't know if any RDBMS vendor implemented it ;-)

Wouldn't it be nice if you could write your query thus?

   Select *
   >From TableA
   Where (ColumnA, ColumnB, Geo_Area_ID,
          Csvy_Rspn_ID, Pop_Sub_Grp_ID, Csvy_Prod_ID)
   ((182, 1, 1049, 101954, 100024, 100310),
    (182, 1, 1107, 101954, 100024, 100310),
    (182, 6, 1049, 101954, 100024, 100310),
    (182, 6, 1107, 101954, 100024, 100310)) ;

Would be nice e.g. for inserting serveral rows with a single insert statement.


  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020