Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 31 Mar 2005 @ 07:57:15 GMT


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


Subj:   Re: BTEQ cast a POSITION
 
From:   Victor Sokovin

  I am trying to format it to character so that I can with another program look a cess1, cess2 to determine if they are greater than zero,meaning, that the character string was found.  


To get started with the data type conversion try something like

     select position ('cessation' in sh.tobacco_comments) as cess1
          , cast(cess1 as CHAR(100))
     from table_name; .

If you like what you see you can nest the CASTs and or adjust the length of your strings (they might depend on the decimal type you get?), if you feel so inclined.

It might be useful to investigate the data type of the intermediate results and perhaps post them here as not many of us can have bteq on the mainframe to our disposal.

     select type(position ('cessation' in sh.tobacco_comments))
     from table_name;

should return this kind of information.


Regards,

Victor



     
  <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