Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 09 Oct 2009 @ 15:34:46 GMT


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


Subj:   Re: Query giving error in SQL Assistant V13
 
From:   Baig, Mohammad

Hi Sreeraj,

MOD in Teradata needs to be used as shown below..

     Sel 4 MOD 2

Not like sel MOD(4,2)

So for your problem here is the solution. Hope this will work.

     CASE WHEN ((((CAST(DW_LSTG_ITEM_COLD.FLAGS2  AS INTEGER))
     * (CASE WHEN (CAST(DW_LSTG_ITEM_COLD.FLAGS2 AS INTEGER))<0 THEN -1 ELSE 1
     END)) - (CASE WHEN (CAST(DW_LSTG_ITEM_COLD.FLAGS2  AS INTEGER))<0 THEN 1 ELSE 0 END))
     /131072 MOD 2) = (CASE WHEN (CAST(DW_LSTG_ITEM_COLD.FLAGS2 AS INTEGER))<0 THEN 0 ELSE 1
     END)) THEN 'Y' ELSE 'N' END COLD_ITEM,

Thanks & Regards

Usman Mohammad



     
  <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