Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replacing Null values in a table or in an array
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01419106
Message ID:
01419126
Vues:
72
>Is there a quick way to replace all the fields in a record that have a .Null. value to a blank value of the field's type, i.e. " " for char, 0 for numbr, .F. for logical, etc.? If it is easier to do this in an array, please let me know.
>Thanks!
local lnI, lcWhere
scatter memvar blank
for lnI  =  1 to fcount()
  lcWhere = field(lnI) + " IS NULL"
  replace field(lnI) with evaluate("m." + field(m.lnI)) for &lcWhere
next
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform