Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rec()
Message
From
20/09/2006 04:28:10
 
 
To
20/09/2006 04:04:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Rec()
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01155073
Message ID:
01155390
Views:
21
thank you very much,it works

>I guess you understand that I don't have the chance to test the code I give you for free, and I do expect you to understand my code and fix it accordingly. However, try this
>local lnNumber, lnFlag
>INDEX ON offer TAG offer && Why, why, why do you have this line? If you need an index tag, you create it ONCE, and it stays!
>Use ANALYSIS1 order offer
>go top
>lnNumber=1
>lnFlag=offer
>do while !eof()
>  replace no with lnNumber
>  skip
>  if offer=lnFlag
>    lnNumber=lnNumber+1
>  ELSE
>    lnNumber=1
>    lnFlag=offer
>  endif
>enddo
>
>>hi,
>>thank you for reply,
>>i try it as under, only flag =1 take serial numbers
>>anothers flag=2,3...to 9 take number =1 only
>>
>>local lnNumber, lnFlag
>>INDEX ON offer TAG offer
>>Use ANALYSIS1 order offer
>>go top
>>lnNumber=1
>>lnFlag=offer
>>do while !eof()
>>  replace no with lnNumber
>>  skip
>>  if offer=lnFlag
>>    lnNumber=lnNumber+1
>>  ELSE
>>      lnNumber=1
>>  endif
>>enddo
>>
>>thanks.
>>
>>>See message#1155081
>>>
>>>>thank you for help and code,
>>>>
>>>>i can do that
>>>>
>>>>via index at my filed
>>>>and replace field with rec(no)all
>>>>
>>>>but i need flag =1 have numbers from 1 to last record
>>>>
>>>>flag=2 from 1 to last record
>>>>
>>>>..
>>>>..
>>>>..
>>>>
>>>>thanks
>>>>
>>>>
>>>>
>>>>>>hi all,
>>>>>>
>>>>>>i have table have more 20000 records
>>>>>>
>>>>>>have fields as flag from 1 to 9,
>>>>>>
>>>>>>i need to replace all fields have flage= 1 numbers from 1 to the last record have flage= 1 as ex.. 145
>>>>>>
>>>>>>flage= 2 take numbers from 146 to end flage=2 as last record is 445
>>>>>>
>>>>>>flage= 3 from 446...etc
>>>>>>
>>>>>>thanks
>>>>>
>>>>>local lnNumber
>>>>>Use yourtable order flag
>>>>>go top
>>>>>lnNumber=1
>>>>>scan
>>>>>  replace yourfield with lnNumber
>>>>>  lnNumber=lnNumber+1
>>>>>endsacan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform