that is what was happening to me SAN MARCOSTX was killing it
This is what I ended up with. I didn't change the city index tag, although I probably should have taken out the rtrim() in the index. This was just a quickie one time deal SELECT 0 USE h-1b_fy14_q4 ALIAS mastfile SELECT 0 USE us_cities ALIAS cities SET ORDER TO city SELECT mastfile GO top DO WHILE .not. EOF() mcity = RTRIM(UPPER(lca_case12)) mstate = RTRIM(UPPER(lca_case13)) SELECT cities SEEK mcity + ", " + mstate IF FOUND() * found it mlat = n3 mlng = n4 SELECT mastfile replace lat WITH mlat replace lng WITH mlng ENDIF SELECT mastfile SKIP ENDDO RETURN On Wed, Jan 21, 2015 at 11:30 AM, Tracy Pearson <[email protected]> wrote: > John Weller wrote on 2015-01-21: > > Better to use IF SEEK(mcity+mstate, 'Cities', 'City'). Mcity+mstate > must > > match index so need to be padded to same length as the index fields, I > > wouldn't index on a trimmed field, others may disagree. Also, suggest > SCAN > > ENDSCAN better than DO WHILE. > > > > Try: > > > > USE h-1b_fy14_q4 ALIAS mastfile in 0 > > USE us_cities ALIAS cities in 0 > > SELECT Mastfile > > SCAN > > IF SEEK(mcity+mstate, 'Cities', 'City') > > mlat = n3 > > mlng = n4 > > ENDIF > > ENDSCAN > > > > Regards > > > > John > > > > I agree with not using trims in indexes. > >From what I've seen, if your data is similar to > Fargo, ND > Minneapolis, MN > > Your index may be built like > FargoND > MinneMN > > I've actually seen VFP 9 error with a bad index when searching for > Minneapolis. > > And in John's example, setting mlat and mlng will need Cities.n3 and > Cities.n4 respectfully. > > > > Tracy Pearson > PowerChurch Software > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAPuy6VM_OhxhA=J9ptNO0Fx3H=fz7wwkkkeqzmtxq2a3adm...@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.

