Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Query
Hi All,
I have the following in a query (T.Loc='101') OR (T.Loc='102') OR (T.Loc='103') OR (T.Loc='104') OR (T.Loc='105') OR (T.Loc='106') OR (T.Loc='107') etc.... is there a way to reduce this ? like T.Loc=101,102,103,104 etc or any other way? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Query
you might try
={101,102} or t.loc=101 and t.loc<107 -- Don Guillett SalesAid Software "Soniya" wrote in message oups.com... Hi All, I have the following in a query (T.Loc='101') OR (T.Loc='102') OR (T.Loc='103') OR (T.Loc='104') OR (T.Loc='105') OR (T.Loc='106') OR (T.Loc='107') etc.... is there a way to reduce this ? like T.Loc=101,102,103,104 etc or any other way? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Query
thanks for your reply
={101,102} does not work and i am not looking for the other option |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Query
Have you tried the IN operator?
Example: T.Loc IN(101,102,103,104) (assuming the values are numeric and not text, otherwise enclose each value in quotes) Does that help? Ron "Soniya" wrote: Hi All, I have the following in a query (T.Loc='101') OR (T.Loc='102') OR (T.Loc='103') OR (T.Loc='104') OR (T.Loc='105') OR (T.Loc='106') OR (T.Loc='107') etc.... is there a way to reduce this ? like T.Loc=101,102,103,104 etc or any other way? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert hard coded query criteria to Parameter Query | Excel Discussion (Misc queries) | |||
Excel 2007 / MS Query - editing existing query to another sheet | Excel Discussion (Misc queries) | |||
Edit Query from Excel will not open query in MSQuery | Excel Programming | |||
Stop to modify the SQL query manually entered into query ! | Excel Programming | |||
Problem with .Background Query option of ODBC Query | Excel Programming |