Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 30 Mar 2005 @ 21:18:46 GMT


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


Subj:   Re: BTEQ cast a POSITION
 
From:   Jason.Fortenberry

Capp,

You have 2 cast statements, but only one data type listed. What is "cess1"? And position returns an integer, so why do you need any casts at all?

Or are you trying to substring 3 characters out of sh.tobacco_comment FOLLOWING the phrase "cessation"? What data type is sh.tobacco_comment?

Assuming it is character, perhaps the following could help you:

     Select substring (sh.tobacco_comment from (position ('cessation' in
     sh.tobacco_comment) + 9) for 3)
     From Table
     Where position ('cessation' in sh.tobacco_comment) > 0;

If you have more info, that would be helpful.


Good luck,

Jason



     
  <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