>>My example was just an illustration. I've come across a problem that I'm STILL trying to resolve. Ideally what I'd like is to be able to use the IN clause just as you've stated. However, my values are unknown at design time. Actually this list is to be populated from a multi-select listbox.
>>When I've attempted putting "IN (?lcList)" in my view and running where lcList = '"A","B"' the returned results include only "A" records, NOT "A" or "B".
>>
>>Having failed at this point to get the IN to work correctly I reverted to allowing a set number of list values, hence using the field = ?parm1 OR field = ?parm2, etc.
>>
>>Would you have any ideas why "IN (?lcList)" doesn't work. Or would you have a viable workaround. Up to this date the direct approach or any of my attempted workarounds AREN'T working.
>>
>>Thanks,
>>Kim
>
>Build an array like:
>laList[1] = "a"
>laList[2] = "c"
>laList[3] = "f"
>
>Select column1 ;
>From xpto ;
>Where AScan(laList, column1) > 0
>
>Alex.
Thanks Alex,
The code you supplied worked as is, but i couldn't get the view designer to accept it. Bruce Campbell had a suggestion to try INLIST. With INLIST I was able to create the view desired and it works okay.
Thanks, Kim
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement