Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conditional scan, using if
Message
 
À
17/02/2014 12:08:44
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01594372
Message ID:
01595254
Vues:
61
Hi, Mike

I was absent from forum and will see your solution.


Moises



>>HI
>>
>>I am not succeeding by using the structure below:
>>Looks like case or if does not match with scan.
>>
>>==========================================================
>>select mytable
>>
>> if empty (variable1)
>>
>> scan for field2 = variable2
>>
>> else
>>
>> scan for field1 = variable1
>>
>> endif
>>
>>
>> endscan
>>===========================================================
>
>
>if empty(variable1)
>  lccmd = "field2 = variable2"
>else
>  lccmd = "field1 = variable1"
>endif
>scan for &lccmd
>
>
>That is the best way to do what you want. The scan command will execute once. There will be no IIF per record waste of processing.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform