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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



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