On Wed, Sep 21, 2011 at 8:22 AM, Grigore Dolghin <[email protected]> wrote: > I would create three indexes, one for each column, and use a WHERE > clause in SELECT, similar to this one: > > WHERE empno = ?m.empno AND kdate = ?m.kdate AND shiftno = ?m.shiftno
Those 3 indexes would never be considered for use in SQL Server. It will do a tablescan all the time. If the user sees empno as 12334 but the data has it as 0001324 you will have to append the "0" but I am sure you know that. Dates in SQL Server are to the second, so [SQLServer] getdate() <> date() [VFP] All of your dates coming from VFP may be set to midnight? That would be great for now but you will get burned sooner or later on it. Always use a between in date searches -- Stephen Russell Unified Health Services 60 Germantown Court Suite 220 Cordova, TN 38018 Telephone: 888.510.2667 901.246-0159 cell _______________________________________________ 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/CAJidMYJbTSu_f9LeCC7A_L=m8ed9d9nvvno1pujv0hh-2pj...@mail.gmail.com ** 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.

