Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 12 Jan 2007 @ 11:28:38 GMT


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


Subj:   ORDER BY in INSERT SELECT to GENERATE Sequence
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, January 12, 2007 05:52 -->

Hi,

When we try to do the below INSERT.. SELECT

     Insert into temp2 (value1, value2, value3)
     As
     Select (value1, valu2, value3) from temp1 order by value1

We get the following error

"3706: ORDER BY IS NOT ALLOWED IN SUB QUERIES"


I understand ORDER BY can't exist in the sub query.

But our intention is to generate a sequence number (in temp2) based on the 'value1' column in some order.

Can some one tell us, how to accomplish this ?


Thanks in advance



     
  <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: 15 Jun 2023