Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 03 Feb 2004 @ 16:15:57 GMT


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


Subj:   FastExport problem with lead
 
From:   Anomy Anom

<-- Anonymously Posted: Tuesday, February 03, 2004 10:28 -->

Hi All:

Consider the following case,

ct t (c1 integer, c2 integer);
insert into t values (1,10);
insert into t values (2,11);
insert into t values (3,14);

Then if I do a

SELECT c1,c2,MIN(c2) OVER (ORDER BY c2 ROWS BETWEEN 1 FOLLOWING AND 1
FOLLOWING) as LEAD
FROM t;

On bteq or SQL Assistant etc, I will get

*** Query completed. 3 rows found. 3 columns returned.
 *** Total elapsed time was 1 second.

         c1           c2         LEAD
-----------  -----------  -----------
          1           10           11
          2           11           14
          3           14            ?

But if I put this inside fexp script as below:

.logtable test;
.logon dbc/test,test;

database testdb;
.begin export sessions 2;
.export outfile test;

SELECT c1,c2,MIN(c2) OVER (ORDER BY c2 ROWS BETWEEN 1 FOLLOWING AND 1
FOLLOWING) as LEAD
FROM t;

.end export;

.logoff;

I will get a

**** 13:58:10 UTY8724 Select request submitted to the RDBMS.
**** 13:58:11 UTY8713 RDBMS failure, 2612: Internal error:  illegal opcode detected.

If remove the "MIN(c2) OVER (ORDER BY c2 ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) as LEAD" from the script, then fexp will be fine.

Is this because fexp does not support the above SQL, or anything missing in fexp script ? Does any one know if there is a work-around for this problem ? (I have to use the lead "function" in fexp.)


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: 27 Dec 2016