Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
10 numbers
Message
From
09/09/2008 04:55:28
 
 
To
09/09/2008 04:53:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01345962
Message ID:
01345984
Views:
15
The last message was meant for Agnes, and not for you. Did you try my solution?

>thank you,
>Have you ever seen the syntax Scan-else-Endscan? i don't mean scan else endscan,
>i mean somthing like that.
>
>have anice time.
>
>i mean
>>Have you ever seen the syntax Scan-else-Endscan? It's new to me. The bottom line is that it will give an error, and even if VFP would not catch the error, the Else statement would never execute since the scan already excluded those records.
>>
>>>Why not?
>>>
>>>no # id_no
>>>
>>>Agnes
>>>>Your code won't work!
>>>>scan 
>>>>  if LEN(ALLTRIM(id_no))==10 AND CHRTRAN(ALLTRIM(id_no),"1234567890","")==""
>>>>    replace no WITH 111
>>>>  else &&error
>>>>    replace no WITH 1
>>>>  endif
>>>>endscan
>>>>
>>>>
>>>>>thank you it works
>>>>>
>>>>>i need to use it as below
>>>>>
>>>>>scan FOR LEN(ALLTRIM(id_no))==10 AND CHRTRAN(ALLTRIM(id_no),"1234567890","")==""
>>>>>    replace no WITH 111
>>>>> else &&error
>>>>>    replace no WITH 1
>>>>>endscan
>>>>>
>>>>>
>>>>>thanks
>>>>>>Hi,
>>>>>>
>>>>>>>if the data (exactly 10 numbers) as 1562907543
>>>>>>
>>>>>>IF LEN(ALLTRIM(data))==10 AND CHRTRAN(ALLTRIM(data),"1234567890","")==""
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform