I get flat files that I'd like to 'flip' to accommodate the multi-value
database. For example, given this table:
123456<vm>DAVID JONES<vm>1234 MAIN ST.<vm>ANYWHERE<vm>MI<vm>12345<am>
654321<vm>JOHN SMITH<vm>4321 MAIN ST.<vm>ANYWHERE<vm>MI<vm>12345
Is there a function that will change it to:
123456<vm>654321<am>
DAVID JONES<vm>JOHN SMITH<am>
1234 MAIN ST.<vm>4321 MAIN ST.<am>
ANYWHERE<vm>ANYWHERE<am>
MI<vm>MI<am>
12345<vm>12345
Right now I use these nested loops, which tend to take a while depending
on the size of TABLE:
NEW.TABLE = ""
FOR A1 = 1 TO DCOUNT(TABLE,@AM)
FOR V1 = 1 TO DCOUNT(TABLE<A1>,@VM)
NEW.TABLE<V1,A1> = TABLE<A1,V1>
NEXT V1
NEXT A1
TABLE = NEW.TABLE
Sincerely,
David Laansma
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users