Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 04 Jun 2007 @ 10:36:19 GMT


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


Subj:   Re: 3714: Insufficient memory
 
From:   D silva, Joseph Vinish

One way to "simplify" the request so that the parser don't end up trying to generate too many concrete steps would be to dump all that values in a volatile table and then join with it ......

Ie something like .

     Create volatile table vt_enums
     (
     Empnum integer
     );

     Insert into  vt_enums values (1);
     Insert into  vt_enums values (2);
     ........
     Insert into  vt_enums values (400);

Then

     Select e.* from
     Emp e inner join vt_enums v on e.empnum v.empnum;

Or rather if you just need numbers from 1 to 400, you could as well use the Sys_Calendar.Calendar table.

     SELECT E.* FROM EMP E INNER JOIN SYS_CALENDAR.CALENDAR C ON E.EMPNUM =
     C.DAY_OF_CALENDAR WHERE C.DAY_OF_CALENDAR BETWEEN 1 AND 400;

Joseph D'silva



     
  <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