When using function TRIMV('T', SUPC_CDLOK, 6, ' ', 1, 'A6V'), I get a correct translation/aggregation to SQL
When using function TRIMV('L', SUPC_CDLOK, 6, ' ', 1, 'A6V'), I get an error FOC2576 - COMBINATION OF PARAMETERS OF TRIMV CANNOT BE CONVERTED TO SQL (same thing for option 'B')
Considering I'm connecting to Oracle where the same TRIM function is present, I'm failing to understand why the function isn't getting translated...
Am I missing something?This message has been edited. Last edited by: Peter,
Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
October 04, 2012, 10:02 AM
Francis Mariani
Try using the native SQL function instead:
SQL.TRIM(...)
I'm not sure where this is documented but it seems like a great new feature.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 04, 2012, 11:05 AM
Francis Mariani
From the Summary of New Features, v7.7.03:
quote:
SQL.Function Syntax for Direct DBMS Function Calls
The SQL adapters support SQL scalar functions in a request. The function must be row based and have a parameter list that consists of a comma-delimited list of columns, constants, or expressions. In order to reference the function in a request, prefix the function name with SQL.
Though there's no mention of which functions are allowed...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 05, 2012, 05:05 AM
Peter
Hi Francis,
I did start using SQL functions in response to a suggestion from JAlbarrán to a previous post of mine.
However, there seem to be some drawbacks when combining several functions in a single define...
That being said, the part I don't understand is why I need to resort to using SQL-functions when the WebFocus functions seem 100% compatible?
(Similarly, I am using SQL.TO_NUMBER instead of EDIT because EDIT refuses to translate to SQL...)
Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode
October 05, 2012, 10:30 AM
Francis Mariani
Peter,
Yes, the Oracle TRIM function does the same type of trimming, leading | trailing | both, so WebFOCUS should be able to translate the TRIMV.
In the past, I know that using AV fields has been tricky - the V functions are fairly recent.
This is when I'd open a case...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 05, 2012, 11:15 AM
Peter
Done!
Prod: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode Test: WebFOCUS 8.0.06 on Win2008/Tomcat7/LDAP Mode