Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] SQL.DTDIFF
 Login/Join
 
Platinum Member
posted
Has anyone tried to use this SQL function and gotten it to work? I may be doing something wrong but when i try and run it with two valid dates ( i just hard coded them for testing sake) the translated oracle SQL comes back with:

 (FOC1410) SQL COLUMN NOT FOUND. (FOR TABLE: CHECK ALIAS NAMES)
 : ORA-00904: "DTDIFF": invalid identifier
 : Erroneous token: DTDIFF
  


Is there a specific syntax i'm not aware of?

This message has been edited. Last edited by: Tim P.,


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
Virtuoso
posted Hide Post
I believe function DB_EXPR has replaced SQL. as the preferred method to pass SQL functions directly to the DB.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Platinum Member
posted Hide Post
I'll have to look DB_EXPR up, not familiar with it. I've use sql.replace in a webfocus report before but this one is throwing me for a loop.


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
Platinum Member
posted Hide Post
I figured it out, i was under the assumption that these functions required the 'SQL.' prefix in front of them but that is incorrect. So this:

DIFFERENCE_IN_DAYS/I6 = SQL.DTDIFF('&YYMD', SOME_DATE_FIELD, DAY);  


Should have been:

DIFFERENCE_IN_DAYS/I6 = DTDIFF('&YYMD', SOME_DATE_FIELD, DAY);  


Good news is my query got a bit faster with this change.


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
Master
posted Hide Post
I believe 8.1.05 has some new streamlined date functions that more closely mirror SQL functions in format and require fewer parameters. Seems I saw that at Summit.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders