Re: boy, I'm rusty

2015-01-21 Thread Virgil Bierschwale
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

RE: boy, I'm rusty

2015-01-21 Thread Richard Kaye
Of Virgil Bierschwale Sent: Wednesday, January 21, 2015 12:46 PM To: profoxt...@leafe.com Subject: Re: boy, I'm rusty 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

Re: RE: boy, I'm rusty

2015-01-21 Thread vrfx
I agree - TRIMming in an Index may be a Bad idea - and SCAN is Great! -K- - Original Message - From: John Weller Date: Wednesday, January 21, 2015 12:10 pm Subject: RE: boy, I'm rusty To: profoxt...@leafe.com Better to use IF SEEK(mcity+mstate, 'Cities', 'City'). Mcity+mstate must

Re: RE: boy, I'm rusty

2015-01-21 Thread Stephen Russell
On Wed, Jan 21, 2015 at 12:51 PM, v...@optonline.net wrote: I agree - TRIMming in an Index may be a Bad idea - and SCAN is Great! - Why not join the tables and force a NULL to the table that you cannot find a match with? SQL is your friend. :) -- Stephen Russell Sr. Analyst

RE: boy, I'm rusty

2015-01-21 Thread Virgil Bierschwale
-Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Richard Kaye Sent: Wednesday, January 21, 2015 1:25 PM To: profox@leafe.com Subject: RE: boy, I'm rusty Sticking that comma in your search string may have unintended consequences. I know it was a one time and you're done

RE: RE: boy, I'm rusty

2015-01-21 Thread Virgil Bierschwale
It is, BUT I am very rusty and I'm on a tight deadline -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Stephen Russell Sent: Wednesday, January 21, 2015 1:23 PM To: ProFox Email List Subject: Re: RE: boy, I'm rusty On Wed, Jan 21, 2015 at 12:51 PM, v

boy, I'm rusty

2015-01-21 Thread Virgil Bierschwale
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(lca_case12) mstate = lca_case13 SELECT cities SEEK mcity + mstate IF FOUND() * found it mlat = n3 mlng = n4 ENDIF SELECT mastfile SKIP ENDDO

RE: boy, I'm rusty

2015-01-21 Thread Tracy Pearson
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.

RE: boy, I'm rusty

2015-01-21 Thread Richard Kaye
: Wednesday, January 21, 2015 11:11 AM To: profoxt...@leafe.com Subject: boy, I'm rusty 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(lca_case12) mstate = lca_case13 SELECT cities SEEK mcity

RE: boy, I'm rusty

2015-01-21 Thread John Weller
...@leafe.com] On Behalf Of Virgil Bierschwale Sent: 21 January 2015 16:11 To: profoxt...@leafe.com Subject: boy, I'm rusty 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(lca_case12

Re: boy, I'm rusty

2015-01-21 Thread Virgil Bierschwale
Sent: 21 January 2015 16:11 To: profoxt...@leafe.com Subject: boy, I'm rusty 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(lca_case12) mstate = lca_case13 SELECT cities

Re: boy, I'm rusty

2015-01-21 Thread Jean MAURICE
First, mstate is not RTRIMMED ! And you could write less code, and more efficient, and more readable, with USE us_cities ALIAS cities ORDER TAG cities IN 0 SELECT 0 USE h-1b_fy14_q4 ALIAS mastfile SCAN ALL FOR ; SEEK(RTRIM(mastfile.lca_case12)+ ; RTRIM(mastfile.lca_case13)) mlat = n3

Re: boy, I'm rusty

2015-01-21 Thread Virgil Bierschwale
yeah, mstate is only 2 chrs wide so I didn't trim it.. there we go, the + sign. Knew it was something silly, I like your code better. I just learned the old way because I did it back in the late 80's when that was how you did it. thanks, Virgil On Wed, Jan 21, 2015 at 10:59 AM, Jean MAURICE

RE: boy, I'm rusty

2015-01-21 Thread Dan Covill
To: profoxt...@leafe.com Subject: RE: boy, I'm rusty Date: Wed, 21 Jan 2015 19:24:52 + I would dump all that trimming; city and state columns usually aren't so wide that you need to worry about storage in the DB or the overall width of the index tag