Focal Point
Question in TABLE HEADERS

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

September 25, 2007, 03:09 AM
<Navin>
Question in TABLE HEADERS
Hi all,

Is that possible to get a sql column as a table header in a report

****************************************
SQL SQLORA

SELECT 'ABC' A , 'DEF' B FROM DUAL;

TABLE FILE SQLOUT
PRINT
A AS B
END

**********************************

My output should be like ,

DEF
ABC

not like

B
ABC


Thanks
Naveen.

WF 7.1.6
September 25, 2007, 10:44 AM
TexasStingray
Navin, If B is always the same you could do something like this
SQL SQLORA

SELECT 'ABC' A , 'DEF' B FROM DUAL;

TABLE FILE SQLOUT
PRINT
A
B
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END
-RUN
-READ HOLD1 &A.xx. &B.xx. 
-* Fill in the xx's with the correct field length.
TABLE FILE HOLD1
PRINT A AS '&B'
END


This will only work if the title of B does not change. And a bigger concern is not you have to process the result set twice. A better option is just to do the SQL and -READ against 1 recordset and then plug in your sql and table file SQLOUT and set the as to &B. Just some words for thought seeing how no one else responded to your question.




Scott