Focal Point
Variables in SQL to label column titles

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

January 05, 2009, 04:10 PM
kfr104
Variables in SQL to label column titles
Does anyone know if you can use a variable table to name your columns in WebFocus?

For example in SQL, I have a table that has three listings for 2005, 2006, and 2007. I want to label the columns in several reports to have each one of those variables as the title. This way I can just update the SQL table when I want to change titles.

Thanks


WebFocus 7.6.4
SQL
HTML and Excel
January 05, 2009, 04:21 PM
FrankDutch
You can table the title database and put the results in amper variables with a -READ.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

January 05, 2009, 09:05 PM
Waz
Ditto with Frank.

You just need to handle if its a variable number of titles, etc.


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!

January 07, 2009, 12:28 PM
Darin Lee
If you're having to remember to update a database with column titles, hold them, then read them again using &vars, seems like it would just be easier to remember to change the TITLE= attribute in the MFD ( unless, as Waz mentions, they are really all the same field with a variable number of titles).


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat