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.
I am trying to perform a search function and I want to be able to return all matching records regardless of the case. I have read posts that suggest the only way to do this is to create a define field that is in upper case and convert the input to match.
I have performed this function in previous reports and it has worked well. My issue is that now this process is significantly slowing up the retrieval process making it too slow to do.
I have also noticed that executing a query within my sql database that matches the one that WebFOCUS generates does return all records ignoring case. However when simply executing the code it is stripping out any that do not match case.
I have tried multiple statements including using the "LIKE", "CONTAINS" and "EQ" comparisons.
Any thoughts as to how I can get the WHERE Statement to pull back all results that SQL returns outside of using a passthrough query, which I know will work, but is not ideal in my particular situation.
ThanksThis message has been edited. Last edited by: Kerry,
Basically it says where tests in TABLE FILE are and have always been case sensitive and that your alternatives are to use SQL Passthru or the UPCASE or LOCASE functions.
One other suggestion might be to do something on the SQL side to get that column (or a variation of that column) into all uppercase or lowercase and then adjust your where to do the same? Basically if you can avoid the function calls to be run for every row, your performance will be much better. Otherwise it sounds like you're stuck using a define or those functions.
It would be really really nice if WF allowed for a little better passthru of common functions -- or better yet, actually send the SQL through like it says it's going to. The reason I say this is that in my test, I generated the SQL trace and looked at it. The sql was fine -- if I ran it directly, it still worked. So something is happening in the handling of the SQL at the reporting server level that is not obvious...
Good luck.
Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio Testing: <none> Using MRE & BID.  Connected to MS SQL Server 2005 Output Types: HTML, Excel, PDF
I am sure that there are MS SQL settings that ignore the case of data within a fetch but can't recall what they might be at present. I used them at a previous client for exactly the reason you have. Worked like a charm.
If I remember or locate them I will let you know.
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
Just to clarify, the SQL selection is not the problem. SQL is passing back the requested result set. It does seem as though upon retrieval of the data to the reporting server that the "WHERE surname EQ 'Smith'" actually reexecutes and strips out based on case.
Just as an FYI to those interested, it seems as though this is standard functionality within WebFocus. I did receive somewhat of a workaround that I hadnt previously thought of which is this...
-DEFAULT &LASTNAME='Smith'
-SET &SN_LENGTH=&LASTNAME.LENGTH;
-SET &LASTNAME_LC = IF &LASTNAME EQ 'FOC_NONE' THEN 'FOC_NONE' ELSE LOCASE(&SN_LENGTH,&LASTNAME,'A&SN_LENGTH.EVAL');
-SET &LASTNAME_UC=UPCASE(&SN_LENGTH,&LASTNAME,'A&SN_LENGTH.EVAL');
TABLE FILE NAMES
PRINT *
WHERE LASTNAME GE '&LASTNAME_UC';
WHERE LASTNAME LE '&LASTNAME_LC';
END
This actually works quite well and will use the table indexes that are defined on your table. The other woraround was to avoid the WHERE clause alltogether and simply use a passthrough query, which was not optimal for my purposes.
The only way to make the query work is to UPCASE both operands of the relational operators EQ or LIKE.
eg WHERE UPCASE(200,LASTNAME,'A200') EQ '&LASTNAME_UC'
Unfortunately since UPCASE is not a function translated into SQL by wf this could be very time consuming since the where would have to be done by webfocus.
A speedy solution could be found to this on the database side in defining a view of the data where the appropriate uppercase function was applied in the new column of the view. For static data a wf xfocus version of the data could be constructed with the names uppercased.
IBI could improve wf.
1. Translate UPCASE to the dbms equivalent and pass the query - not hard.
2. Have a suffix for alpha operators NCS - not case sensitive so that your query would be
WHERE LASTNAME EQ_NCS '&LASTNAME'
and issue the appropriate SQL translation. Harder but neater!
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2 Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006
Thanks for the feedback, however after doing some initial testing it seems as though I have no issues with returning incorrect data. Perhaps it is my combination of firstname and lastname that I must search by that is helping to eliminate any false positives.
Use of the LCWORD function may also help to eliminate false positives. You could say GE uppercase value and LE mixed case value
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
We have placed a request with the fine folks at Information Builders to look at a future enhancement that would make this whole mess a lot easier. They have responded by saying that a fix/enhancement is currently in the works, so that is some good news.
After doing some more investigation I can confidently say that the above example works like a charm. No issues. I am only receiving back the data that I am expecting.
The issue with specifying UPCASE, LOCASE and/or LCWORD in the select or where statements is that the data manipulation occurs within the reporting server and not on the DBMS as hammo1j mentions.
The next suggestion of a view being defined again would be a good choice if we had that level of control. Unfortunatly creation and rollout of a view within our business unit could take some time.
Therefore the WHERE clause selecting data based on a range from lower case to upper case makes the most sense as it is executed on the DBMS level and utilizes indexes that have already been set up.
Again thanks for all your help and input. When the case with IBI is resolved I will update this forum.
I've discovered the same limitation... there really should be a SET command that turns off web focus re-evaluating the WHERE in a case sensitive manner.
gweller - you mentioned that 7.7 is going to address this? Do you know if they did, how it was implemented?
there really should be a SET command that turns off web focus re-evaluating the WHERE in a case sensitive manner
I can see your point, and it would be handy sometimes. But the fact that WF can access multiple databases and DB types (in a single request) would still convince me that it should be handled individually by the DBMS, not as a blanket setting from WF.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007