Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select Fields, but don't know the name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00669125
Message ID:
00669135
Vues:
14
This message has been marked as the solution to the initial question of the thread.
LOCAL lnCt, jnX, laFldList

DIMENSION laFldList(1)

ACTIVATE SCREEN
CLEAR
? "Fields in current record having a value of 12:"

* Field types: 
* C = Character 
*D = Date
*				 L = Logical
*				 M = Memo
*				 N = Numeric
*				 F = Float
*				 I = Integer
*				 B = Double
*				 Y = Currency
*				 T = DateTime
*				 G = General


lnCt=AFIELDS(laFldList)
IF lnCt > 0
	FOR jnX = 1 TO lnCt

		IF INLIST(laFldList(jnX,2),"N","B","Y","I","F")  && all numeric data types
			IF EVALUATE(laFldList(jnX,1)) = 12

				? CHR(9) + laFldList(jnX,1) && identify field names where contents = 12

			ENDIF && EVALUATE(laFldList(jnX,1)) = 12
		ENDIF && INLIST(laFldList(jnX,2),"N","B","Y","I","F")

	ENDFOR && jnX

ENDIF && lnCt > 0


RELEASE lnCt, jnX, laFldList
David Martin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform