On Wed, Apr 23, 2008 at 10:26 AM, Kevin O'Shea <[EMAIL PROTECTED]>
wrote:

> >-----Original Message-----
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On
> >Behalf Of Stephen Russell
> >Sent: Wednesday, April 23, 2008 10:58 AM
> >To: [EMAIL PROTECTED]
> >Subject: Re: Looking to optimize a query
> >
> >
> >are the keys the same between the tables?
> >
> >SELECT FROM maintable
> >WHERE pKey NOT IN
> >(
> >SELECT pKey  FROM filterlisttable
> >)
>
> Our SELECT does have the same "keys" in each table, but these keys are
> made
> up from multiple fields.
>
> SELECT FROM maintable WHERE field1+field2+field3 NOT IN (SELECT
> field1+field2+field3 FROM filterlisttable)
>
> -----------------------------------
>

In SQL Server table you could make a computed column but I'll guess that
this is a VFP table.

Can you give more info on what col1,2,3 are?  Because it is all index that
is getting you here.

is one a Date, DateTime?  one an int that your doing a str() around and
worse yet an upper() or lower() ?




-- 
Stephen Russell
Sr. Production Systems Programmer
Mimeo.com
Memphis TN

901.246-0159


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to