Focal Point
[SOLVED] save column to string

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2627061776

July 09, 2015, 01:21 PM
borgas
[SOLVED] save column to string
Hello,

I want to save the rows of a table with a single column into a string, the values separated by commas.

for example

TABLE FILE CAR
PRINT
CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE HOLD AS CARS
-RUN

the result will be:

JAGUAR
JENSEN
DATSUN
MASERATI
TOYOTA
AUDI
TRIUMPH
ALFA ROMEO
BMW
PEUGEOT

if i use -READ CARS &CAR.A20.
i only get the first record

What I need is to save these values in a string separated with commas like:

JAGUAR,JENSEN,DATSUN,MASERATI,TOYOTA,AUDI,TRIUMPH,ALFA,ROMEO,BMW,PEUGEOT

How can i achive this.

Ricardo.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8008
July 09, 2015, 01:56 PM
Danny-SRL
This might help...
  
-* File borgas01.fex
TABLE FILE CAR
SUM CAR
ACROSS CAR 
ON TABLE HOLD FORMAT DFIX DELIMITER ,
END
!TYPE HOLD.FTM



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

July 09, 2015, 06:06 PM
Waz
Very nice Daniel.

Good One


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

July 10, 2015, 04:17 AM
borgas
Thanks Daniel,

Thats exacly what i needed.
works perfectly.


WebFOCUS 8008
July 10, 2015, 09:59 AM
Kevin W
Or create a comma delimited output file with format COM, COMMA, or COMT?


WebFOCUS 7.7.05 (Someday 8)
Windows 7, All Outputs
In Focus since 1983.