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     WHERE clause in FOCUS query (Oracle Adapter in use)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
WHERE clause in FOCUS query (Oracle Adapter in use)
 Login/Join
 
Member
posted
I'm stumped...

I have a WHERE clause with a date range like this:

WHERE ORDERDATE GE DT(&FROMDT) AND ORDERDATE LE DT(&TODT)

The date range is entered from a parameter screen. The user wants one days worth of data so they enter 03/28/2006 in TO and FROM date fields. WEBFOCUS returns no records.
This is a known issue with Oracle's dates, BUT my workaround is to add one day to the &TODT and I should be able to get "up to" but not including the next day's data.

Is this possible within the WHERE clause, if so what is the syntax?
 
Posts: 23 | Location: Daytona Beach, FL | Registered: February 07, 2005Report This Post
Guru
posted Hide Post
Don't you want to change the LE to LT?

WHERE ORDERDATE GE DT(&FROMDT) AND ORDERDATE LT DT(&TODT)
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Member
posted Hide Post
The underlying problem/issue is that Oracle includes a time in its date which makes it compare this '03/28/2006 00:00:00'

For example:

WHERE orderdate ge DT('03/28/2006 00:00:00') and orderdate le DT('03/28/2006 00:00:00')

So the date range is only 1 second.

Here is what I need to do:

WHERE orderdate ge DT('03/28/2006 00:00:00') and orderdate lt DT('03/29/2006 00:00:00')

How do I add one day to the user entered TODT within the WHERE clause?

Thanks for your help!
 
Posts: 23 | Location: Daytona Beach, FL | Registered: February 07, 2005Report This Post
Guru
posted Hide Post
Sorry, I though you had created the DM code to advance the date by one day. I ran into this problem before using a DB2 database so I'm hope this fix will work for you.

-SET &START_YYMD_T = EDIT(&START_YYMD, '9999/99/99') | ' 00:00:00';
-SET &END_YYMD_T   = EDIT(&END_YYMD, '9999/99/99') | ' 23:59:59';
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Member
posted Hide Post
Guru,

You are awesome. This is exactly what I was looking for - but couldn't dream up myself.

Thank you so much for your help.
 
Posts: 23 | Location: Daytona Beach, FL | Registered: February 07, 2005Report This Post
Guru
posted Hide Post
I'm glad it worked. You could give the function DATEMOV a look too but the other solution is easier.
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report 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     WHERE clause in FOCUS query (Oracle Adapter in use)

Copyright © 1996-2020 Information Builders