Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>Try instead of IN:
<>SELECT DISTINCT ;
>> Codes.type, Codes.code, Codes.subsystem ;
<> FROM codes ;
>> WHERE ","+ALLTRIM(STR(Codes.subsystem))+"," $ (?csubsystem)
>Um, ok... that worked! Why?
Because IN is a function similar to INLIST, that requre a list of expressions(unlike $ operator). To see the difference in your case try :
[...where fieldvalue IN (",1,", ",2,", ",3,")] instead of
[...where fieldvalue IN (",1,2,,3,")].
To avoid confusion I personally use these three functions in three different situations: $ - to choose from the string, INLIST - to chose from the list of expressions, and IN - in Select statement with subquery in WHERE clause.
>I'm using the view designer, how do I get it to use the $ instead of IN?
You can modify View SQL statement as desired.
Good luck
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only