#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Query

thanks for your reply

={101,102}
does not work and i am not looking for the other option

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Edit Query from Excel will not open query in MSQuery Michelle Excel Programming 0 February 21st 05 03:59 PM
Stop to modify the SQL query manually entered into query ! Olivier Rollet Excel Programming 6 November 3rd 04 08:34 AM
Problem with .Background Query option of ODBC Query Shilps Excel Programming 0 April 19th 04 06:41 AM


All times are GMT +1. The time now is 12:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"