Focal Point
Reading a hold file and setting a session variable

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

September 29, 2005, 06:42 PM
webfocusdev
Reading a hold file and setting a session variable
Hi,

I running an Oracle passthru query and storing the results in a hold file. I need to read the hold file and count the number of disinct doc #'s. How would I set the results of the query below into a variable that I can display at the top of my report. Thanks...

TABLE FILE HOLD_SD
SUM CNT.DST.SD_NUM AS 'Total Records'
END
September 29, 2005, 07:03 PM
codermonkey
Is this what you want to do?

TABLE FILE HOLD_SD
SUM CNT.DST.SD_NUM/I9
ON TABLE HOLD AS HCOUNT FORMAT ALPHA
END
-RUN
-READ HCOUNT &DSTCNT.I9.

TABLE FILE HOLD_SD
HEADING
"Total Records: &DSTCNT"
PRINT bunch of stuff
WHERE whatever
END
September 29, 2005, 07:14 PM
webfocusdev
That was exactly what I was trying to do. Thanks!