Jump to content


Photo

Foxpro indexes not working when accessing through ODBC


  • Please log in to reply
1 reply to this topic

#1 Lockley

Lockley

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 07 April 2006 - 08:04 AM

Hi,

Has anyone run into the problem, when querying the mom tables through access and odbc, of not having the indexes work for some queries ?

Specifically, when I run a query on the CMS table and search for a record using the alt_order field in the where clause, it appears to not use the index that is defined for that field.

Is there a fix for this problem ? or am I missing something ?

A sql example that should be fast, but isn't is something like this:

select order from cms where alt_order = '323771'

or

select order from cms where internetid = 'Yahoo-323771'

Any help you have would be greatly appreciated.

Thanks.

-Lockley Gentes/WorshipMusic.com

#2 Lockley

Lockley

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 07 April 2006 - 11:38 AM

Well, after some investigation. I came up with an answer. It appears the UPPER command is used in the index (when it was created). You can use the following sql query and it uses the index:

select order from cms where UPPER(alt_order) = '323771'

-Lockley Gentes/WorshipMusic.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users