Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 21 Dec 2005 @ 14:49:15 GMT


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


Subj:   Re: Passing the value for an IN clause to a stored
 
From:   Michael Larkins

Hi Matt:

I think you would have more luck with something like this:

     select count(branch_id)
       into :valout
       from branch
       where position(mail_state in :varlist ) > 0;

Then pass the list of states ('PA HI AL') one string for the position to parse through. The space is important to keep you from getting too many rows. Ie. 'PAHIAL' would return Penn, Hawaii and Ala., plus Iowa (IA) combo of last letter of Hawaii and first letter of Alabama.


Hope this helps,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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