Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error scanning
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00672599
Message ID:
00672616
Views:
7
>Here is a long way (it can be shorter, but this is easy to understand):
>
>
>SSN="2c3456789"
>FOR i=1 TO LEN(ALLTRIM(SSN))
>   IF !INLIST(SUBSTR(ALLTRIM(SSN),i,1),'1','2','3','4','5','6','7','8','9')
>       MESSAGEBOX('This record has the character of '+SUBSTR(ALLTRIM(SSN),i,1),16)
>   ELSE
>       ?SUBSTR(ALLTRIM(SSN),i,1)
>   ENDIF
>ENDFOR
>
>
>
>>Some background: I have a table that is being generated on a daily basis. I need to run a few scans on the table to validate the data. One of the these checks involves making sure the social security numbers are ONLY numbers. If it does find a character in one of the fields, then I should get a message box alerting me of the error.
>>
>>For example, this is something along the lines of what I need to do.
>>
>>use export
>>scan
>> if (any digit of the ssn is not 1 - 9)
>> wait window "SSN error" at 20,70
>> endif
>>ENDSCAN
>>
>>Any help would be appreciated.
>>Thanks
>>
>>Ramone

Tracy,
This will be much-much slower!
Venelina Jordanova

Outsourcing IT Services Ltd.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform