General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
What I have is a code like this:
GO TOP
i=1 && i = counter variable
c=0 && c is initialised to 0
IF RECNO()=1
c=VAL(village) &&c is assigned the first value of the village for the first rec ENDIF
SCAN
REPLACE ccount WITH i && value of i is assigned to the variable ccount
IF c=VAL(village)
i=1+1
ELSE
i=1
ENDIF
c=(village)
ENDSCAN
Tell me what I'm doing wrong here ....... coz I want the value of ccount to be incremented until the value of the village changes and i starts counting again from 1 til the next village etc etc ....
Thanks,
Richard.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only