Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last filled column
Message
De
03/05/2008 08:44:27
 
 
À
03/05/2008 08:08:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01314907
Message ID:
01314909
Vues:
8
This is one of solution.
Of course, you can modify it to your needs.
SELECT TOP 1 * FROM price ORDER BY date DESC INTO CURSOR LastPrice

=AFIELDS(columnsx, "lastprice")
FOR i = 2 TO ALEN(columnsx,1)
	columnName = columnsx[i,1]
	columnValue = "LastPrice."+columnName
	columnValue = EVALUATE(columnValue)
	
	IF columnValue <> 0
		LastValue = columnValue
	ENDIF
ENDFOR

? LastValue
>Dear Experts
>
>Price.dbf has following Five fields
>
>date ---- d(8)
>rate1 ---n(4)
>rate2 ---n(4)
>rate3 ---n(4)
>rate4 ---n(4)
>
>Data in fields as
>
>Date ---- rate1-----rate2-----rate3------rate4
>22/01-----195---------0----------0----------0---
>24/01-----195-------180---------0----------0---
>25/01-----225-------230-------215---------0--
>24/01-----335-------180-------200-------205
>
>Text1.value=25/1
>
>How to findout the value in last filled column in four columns i.e rate1,rate2,rate3 and rate4.
>
>The answer must be 215
>
>Please help
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform