Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Additon in character type data
Message
 
À
29/06/2006 23:42:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01132547
Message ID:
01132985
Vues:
49
This message has been marked as the solution to the initial question of the thread.
Tariq,
I had error in my first post. but after that I updated it. Did you try updated code?

>My dear Professor
>
>
>SELECT Trial
>index on  code to a
>GO TOP
>lcFirstLeft   = LEFT(code,1)
>lcNextReplace = 0
>SCAN
>   IF NOT LEFT(code,1) == m.lcFirstLeft
>      lcFirstLeft   = LEFT(code,1)
>      lcNextReplace = 0
>   ENDIF
>   m.lcNextReplace = m.lcNextReplace+1
>   REPLACE code2 WITH INT(VAL(lcFirstLeft+PADL(m.lcNextReplace,2,[0])))
>ENDSCAN
>
>
>Your above codes display following results
>
>801--------1
>803--------2
>807--------3
>809--------4
>902--------5
>905--------6
>906--------7
>908--------8
>
>But I need following results
>column2=alltrim(substr(column1,1,2))+auto increment number starts from 1 as below
>
>801--------801
>803--------802
>807--------803
>809--------804
>902--------901
>905--------902
>906--------903
>908--------904
>
>Please help again
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform