Curtis is exactly correct. The SQL BETWEEN function is the first he mentions, which is the way I'd probably do it. The second way he mentions would be the alternate method, if a particular SQL command parser didn't like the first way.
Evan
>>That certainly looks better...but how do I write the WHERE condition? Say the array is alist of catalog numbers from 300 to 390.
>
>You have several options:
>
>SELECT * FROM MYTABLE WHERE catalognum BETWEEN 300 AND 390
>
>SELECT * FROM MYTABLE WHERE catalognum >= 300 AND catalognum <= 390
>
>SELECT * FROM MYTABLE WHERE BETWEEN(catalognum, 300, 390)
>
>SELECT * FROM MYTABLE WHERE catalognum IN (300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390)
>
>;} There may be others, but that wore me out.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN
If a vegetarian eats vegetables, what does a humanitarian eat?