<<
set var vwhat =  '1025,1098,2048,3152'

select requirements from reqlist where ctxt(reqid) in (.vwhat)

where reqid is an integer column in reqlist... is there some way to
manipulate it like this? 
>>

If I understand, you have a text column and that column holds a comma separated 
list of integer values.  You know a particular integer value and you want to 
find all records where that integer exists as one of the comma separated 
values.  Is that right? (If it's the other way around, of course, you can just 
use the IN operator).

If all the integers are the same number of digits as in your example, it's easy:

SELECT Requirements FROM ReqList WHERE vListColumn CONTAINS 
(CTXT(.vValueSearchedFor))

If the integers are different lengths so that one integer could _contain_ 
another, you can get a little fancier:

SELECT Requirements FROM ReqList WHERE (',' + vListColumn + ',') CONTAINS (',' 
+ CTXT(.vValueSearchedFor) + ',')

This adds commas at the beginning and end of the comma-separate column values. 
Then, it searches for any records where the modified list contains your 
integer, with commas on either end.
--
Larry


Reply via email to