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.
Microsoft SQL Server does not have a Date-only data-type, just a Date-Time data-type. When you generate a WebFOCUS Master for a table with Date-Time data-types, they are generated as HYYMDs formatted columns. You can modify the Master and change the format to DATE, YYMD.
I don't like modifying my Masters after they're generated, so I add a DEFINE in a fex to convert the HYYMDs column to YYMD with this:
I modify the master and if I need the time also I add an extra field in the master that points to the same database filed with an other format (HYYMDs)
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
We have SQL SQLMSS SET DATETIME OFF in the edasprof.prf In case we want to create metadata with datetime for some data source we temporarily comment it out.
Gone are the days of losing time consuming edits of the master files when regenerating them. Most, if not all, the modifications are retained.
For Date fields I think the most useful method is the additonal column in the master, and if your masters are changing that often then you have to ask the question why?
Just take advantage of the fact that the ALIAS must conform to the host tables real column name and add additional columns -
Tony, what do you mean by "Gone are the days of losing time consuming edits when regenerating them"?
If I do as you suggest and add an additional column, when I regenerate the master file, won't the additional column get wiped out?
I find the problem with using SQL SQLMSS SET DATETIME OFF is that if you have a regular Date field and a Date-Time field (a row update time-stamp for example), you can't mix the two - it's either all Date or all Date-Time.
Thanks,
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
Very probably. The edits to which I was refering were the description and title fields that everyone wanted to reduce the need to add AS 'some nice title' in the fex. In versions gone by these were lost on regenerating the mas, not now though.
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
I think this was a new option post 5.2 at least. In 7.1.3 we get the option to "replace" the master file or just "refresh" it. If we "refresh" it the previous changes made to it are not over-written. On the down side, though, if the field's data length has changed, that doesn't get updated either.
Have you considered creating a MS/SQL view of the table in which the view makes the format conversion from MS/DateTime format to an 8-character yyyymmdd string that is compatable with FOCUS's date formats?
TABLE FILE this view instead of the underlying MS/SQL table.
This has three advantages: 1) The date conversions are always there. You don't have to include *.fex code that does it in every FOCUS process using the table's dates. 2) It's likely quicker in elapsed time to do it on the SQL server than on the WF server. 3) If you need to WHEN on the date, the selection takes place on the SQL server and rows that do not meet the WHEN criteria are not sent over the network to the WF server. FOCUS is sent only the rows that it needs.
WIN/2K running WF 7.6.4 Development via DevStudio 7.6.4, MRE, TextEditor. Data is Oracle, MS-SQL.
Posts: 154 | Location: NY | Registered: October 27, 2005
i put a function in my edasprof EXPENSEDATE_YYMD/YYMD =F_DATE(EXPENSEDATE); which translates the datetime to a smart. This way, my end user of reporting objects on those sql files can define a field with no ageda. This way i can also provide stuff like F_MONTH or F_WEEK and keep from having to remember the syntax myownself. I try to convince dba's to store a key date in integer, then all this ageda goes away, but alas, that would be too easy.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
In our case we never report on the sql tables directly. This is because we are limited with the name of fields that complicated to be undestood by our users. And also because of some data type fields. In most of the cases we create views that allow us to rename fields as we want and also to change their type.
Majid.
WebFocus 7.6.5 AND WebLogic server as web server sql2005 as database server
Posts: 273 | Location: Europe | Registered: May 31, 2007
Jason K, thanks for pointing me to that link - interesting stuff.
Frans, this is what I normally do.
Majid, that's a good idea.
Here's something no one pointed out and is exactly the reason why I don't muck around with a Master generated by WebFOCUS.
For ease of use, a programmer where I work changed the format of two DateTime fields in the master for a SQL Server table from HYYMDs to YYMD. This is great for reporting, but if the DateTime field in the table contains Time, then a straight-forward filter on the Date will not work, i.e WHERE MODIFIEDON EQ '2007/12/05' returns zero rows, while WHERE MODIFIEDON GE '2007/12/05' AND MODIFIEDON LT '2007/12/06' RETURNS THE ROWS I'm expecting.
An unsuspecting soul would look at the Master and only see YYMD and not understand why a filter would not work.
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
This occurs for the data extraction step where SQL is generated. The dates are treated as normal Date fields for any post-data extraction steps using the HOLD files.
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
The problem with creating a view that extracts the date portion of a DateTime column is that the substring is char - you still need a DEFINE to turn it into a Date so you can perform date functions on it.
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