Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimize Program
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00657743
Message ID:
00657818
Views:
23
> SELECT MYTABLE
> IF RECCOUNT() > 0
> SCAN
> ADDRESSVALUE=MYTABLE.ADDRESS
> STANDARDIZE(ADDRESSVALUE)
> REPLACE STREETNAME WITH STNAME, STREETNO WITH STNO, PREDIRECTIONAL WITH PREDIR, SECONDARYADDR WITH SECADR
> ENDSCAN
> ENDIF
>
>STANDARDIZE IS A PROGRAM THAT SPLITS THE ADDRESS FIELD INTO
>THE VARIABLES STNAME,STNO,PREDIR,SECADR.
>
>ANY SUGGESTIONS WOULD BE MUCH APPRECIATED.
>
>RIA

It should work as-is, but here are a couple notes...
You don't need reccount() - if it does not have any records, it won't have anything to scan.
Don't assign the value to a variable.
Put the code in your scan instead of calling an external routine.
REPLACE STREETNAME with SUBSTR(ADDRESS,x,x)
REPLACE STREETNO with SUBSTR(ADDRESS,x,x)
...
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform