Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Produce a Complex String
Message
De
10/12/2007 13:15:54
Steven Dyke
Safran Seats USA
Texas, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01274465
Message ID:
01274492
Vues:
15
Here is my solution taken from the help of you all:

CLEAR
SET EXACT On
partnoS = ""
partnoS2 = ""
recseqS2 = ""
lcString = ""

SELECT testQuery

lcString = ""
SCAN

IF NOT ALLTRIM(testQuery.partno) == partnoS Then
IF NOT RIGHT(recseqS2,2) == ")," Then
recseqS2 = SUBSTR(recseqS2,1,LEN(recseqS2)-2)
recseqS2 = recseqS2 + "),"
EndIf
lcString = "),"
recseqS2 = recseqS2 + ALLTRIM(testQuery.partno) + "("+recseq+lcString

ELSE
IF RIGHT(recseqS2,2) == ")," Then
recseqS2 = SUBSTR(recseqS2,1,LEN(recseqS2)-2)
recseqS2 = recseqS2 + ","
EndIf
lcString = ","
recseqS2 = recseqS2 + recseq+lcString
ENDIF
partnoS = ALLTRIM(testQuery.partno)

ENDSCAN
recseqS2 = SUBSTR(recseqS2,3,LEN(recseqS2))
recseqS2 = SUBSTR(recseqS2,1,LEN(recseqS2)-1)
recseqS2 = recseqS2 + ")"
? recseqS2
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform