As for the differences, you will need to check the SQL generated to compare, using SQL tracing
WITH is just a way to associate some info that is not in the table with a row in the table.
e.g. Field/format WITH DBField = FUNCTION...
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
October 11, 2016, 08:37 AM
dhagen
The SQL. is for direct reference of a sql function, where the DB_EXPR you can enter an full expression. That being said, you can reference a sql function using the DB_EXPR.
Example (MS SQL):
PASCALESUM/I11 WITH DMHR.ID_NUM=DB_EXPR(SUM(PAYSCALE) OVER(PARTITION BY PLANT));
START_DOW/A10 WITH DMHR.ID_NUM=DB_EXPR( DATENAME( dw, START_DATE ) );
START_MONTH/I2=SQL.MONTH( START_DATE );
The WITH is not always required with the SQL. prefix, but it doesn't hurt to add it.
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
October 11, 2016, 10:43 AM
Clif
Even when calling a function with SQL. it's limited. The parameters must be columns, constants or expressions.
If you want to call a function that takes a keyword then use DB_EXPR. For example the MS SQL Server function CONVERT takes a parameter of datatype such as CHAR:
DB_EXPR(CONVERT(CHAR, "start_date", 102))
N/A
October 11, 2016, 11:18 AM
BM
Thanks all
WebFOCUS 8202M
October 11, 2016, 11:48 AM
Tony A
quote:
it's limited.
One of the most limiting is (or was) that only one pair of parenthesis can be used in SQL.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10