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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] WebFOCUS SQL Traces - Generated SQL not compatible with MS SQL Server

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] WebFOCUS SQL Traces - Generated SQL not compatible with MS SQL Server
 Login/Join
 
Expert
posted
When you turn WebFOCUS SQL traces on, you can copy the generated SQL and run it in MS SQL Server Enterprise Manager, EXCEPT when Date-Time columns are used in selection criteria- the generated SQL is not compatible.

This example, copied from WebFOCUS, does not work when run in SQL Server Enterprise Manager, I get the error "Your entry cannot be converted to a valid date time value.".

SELECT T1."ActivityEnd",T1."BMOAreaName",T1."ActivityId",
MIN(T1."ActivityEnd"), MIN(T1."RegardingObjectIdName"),
MIN(T1."Subject") FROM GGOF_CRMEXT.dbo.ActivityPointerView T1
WHERE (T1."ActivityEnd" < '20080925 04:00:00.000') AND
(T1."ActivityEnd" >= '20080922 04:00:00.000') AND
(T1."IsWorkflowCreated" <> 1) AND (T1."BMORSMId" =
'{FD668BD1-BF75-DD11-BBA7-001438BFF493}') AND
(T1."ActivityTypeCode" = 4201) GROUP BY T1."ActivityEnd",
T1."BMOAreaName",T1."ActivityId" ORDER BY T1."ActivityEnd",
T1."BMOAreaName",T1."ActivityId";

I have to modify the Date-Time values for the SQL to work. This works:

SELECT T1."ActivityEnd",T1."BMOAreaName",T1."ActivityId",
MIN(T1."ActivityEnd"), MIN(T1."RegardingObjectIdName"),
MIN(T1."Subject") FROM GGOF_CRMEXT.dbo.ActivityPointerView T1
WHERE (T1."ActivityEnd" < '2008-09-25 04:00:00') AND
(T1."ActivityEnd" >= '2008-09-22 04:00:00') AND
(T1."IsWorkflowCreated" <> 1) AND (T1."BMORSMId" =
'{FD668BD1-BF75-DD11-BBA7-001438BFF493}') AND
(T1."ActivityTypeCode" = 4201) GROUP BY T1."ActivityEnd",
T1."BMOAreaName",T1."ActivityId" ORDER BY T1."ActivityEnd",
T1."BMOAreaName",T1."ActivityId";

I suppose this is a rhetorical question: why does WebFOCUS generate SQL that can't be executed outside WebFOCUS?

This message has been edited. Last edited by: Kerry,


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Not my strong expertise --- but we generate SQL that is compatible with the SQL PREPARE call. Searching MSDN for the error msg, you see that certain parts of enterprise manager support different date formats. That leads me to believe that they use multiple pre-parse engines and these engines are not as robust (or as forgiving) as the underlying DBMS parser. (The GRID pane supports local-specific, the SQL pane does not...)


Brian Suter
VP WebFOCUS Product Development
 
Posts: 200 | Location: NYC | Registered: January 02, 2007Report This Post
Expert
posted Hide Post
Thanks Brian.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] WebFOCUS SQL Traces - Generated SQL not compatible with MS SQL Server

Copyright © 1996-2020 Information Builders