Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 22 Sep 2005 @ 14:09:28 GMT


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


Subj:   Re: UDF + NOT EXISTS + CASE
 
From:   Anomy.Anom

<-- Anonymously Posted: Thursday, September 22, 2005 10:04 -->

Hi,

in your sql code I see stg strange. The sql is this:

     SELECT  *
     FROM    taoa
     WHERE   NOT EXISTS
             (
             SELECT 1
             FROM   tas01
             WHERE  taoa.oan  = CASE
                                WHEN taoa.appli_cd = '80' THEN
                                     ( lpad( COALESCE( CAST(
                                          CAST( tas01.pinsuper AS INTEGER)
                                          AS VARCHAR(5) ), '' ), 5, '0') )
                                     || ( COALESCE(tas01.pintycon, '' ) )
                                ELSE
                                     '90000' || ( COALESCE(tas01.pintycon, '' ) )
                                END
             )

I see that you use TAOA table in the where condition of the subquery but you don't use it in the from clause (you use only tas01 table) of the subquery itself.

I happened to face a similar problem some months ago, and the response of the teradata gsc was that in the query there was something like a circular reference, if I remember right; this caused the user crashdupms to login and "write the dump"...

If I were you, I would write the sql in a different way, and try again submitting the query.



     
  <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