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     SQL BETWEEN equalivent

Read-Only Read-Only Topic
Go
Search
Notify
Tools
SQL BETWEEN equalivent
 Login/Join
 
Member
posted
I've run into a snag with an index on DB2 within a large transaction table. The DBA has utilized the FIELDNAME (a date field) as an index.
If I simply use a
WHERE FIELDNAME GT '2004-01-19' AND
FIELDNAME LT '2004-12-31'

DB2 appears to ignore the index and scan the table. If within direct SQL I utilize a BETWEEN command on those dates DB2 will utilize the index (and speed things up).

Any suggestions of a FOCUS equalivent of a between short of direct SQL? (DB2/MVS) Focus 7.2
 
Posts: 6 | Location: Grand Rapids, MI | Registered: April 25, 2003Report This Post
<Grzegorz>
posted
The syntax equivalent of SQL BETWEEN is (informally):
TABLE FILE ...<br />...<br />WHERE <field> FROM <value1> TO <value2><br />...<br />END
but I did not checked yet, how is it translated to SQL for the relational adapter.

Regards
Grzegorz
 
Report This Post
Member
posted Hide Post
Many thanks!
That appears to be taking advantage of the index.
 
Posts: 6 | Location: Grand Rapids, MI | Registered: April 25, 2003Report This Post
<pranas>
posted
How about using SQL Passthru?

SET SQLENG=<engine>
SQL
<native_sql>
END

It helps writing eficient code (specialy when timestamp fields used :-)

Pranas
 
Report 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     SQL BETWEEN equalivent

Copyright © 1996-2020 Information Builders