Environment versions
Network:
Windows 2000 Server
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
Previous
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