Archives of the TeradataForum
Message Posted: Wed, 21 Dec 2005 @ 14:49:15 GMT
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
|