Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error scanning
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00672599
Message ID:
00672639
Vues:
8
I know, I just saw your post with the much quicker and more concise code. I was only posting it as an 'easy to understand' code, because I didn't know what his/her skill level was so I made it simple.
Tracy

>>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!
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform