Jump to content

Recommended Posts

Posted

One of the strengths of WebFOCUS is the ability make direct SQL function calls.

The SQL adapters support SQL scalar functions in a request.

Here is an example running against the WebFOCUS test MSSQL WF_RETAIL_LITE database:

-*

-* Turn on SQL Tracing.

-*

SET TRACEOFF = ALL

SET TRACEON = SQLTRANS

SET TRACEON = STMTRACE//CLIENT

SET TRACEON = SQLAGGR//CLIENT

SET TRACESTAMP = OFF

SET TRACEWRAP = 78

SET TRACEUSER = ON

-RUN

-*

-* Create Revenue Report

-*

APP PREPENDPATH WFRETAIL

DEFINE FILE WF_RETAIL_LITE

REVENUE_ROUNDED/I12CM = SQL.ROUND(REVENUE_US,0,0);

END

-*

TABLE FILE WF_RETAIL_LITE

"Revenue By Product Category By Date"

PRINT REVENUE_US

REVENUE_ROUNDED AS 'Revenue, Rounded'

BY PRODUCT_CATEGORY

BY TIME_DATE

IF READLIMIT EQ 30

ON TABLE COLUMN-TOTAL

ON TABLE PCHOLD FORMAT HTML

ON TABLE SET HTMLCSS ON

ON TABLE SET STYLE *

INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$

TYPE=TITLE, STYLE=-UNDERLINE, JUSTIFY=CENTER,$

ENDSTYLE

END

 

 

 

image.png534518 10.1 KB

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...