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     Operator NOT IN ('X', 'Y', 'Z')

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Operator NOT IN ('X', 'Y', 'Z')
 Login/Join
 
Platinum Member
posted
What is the correct syntax for using NOT IN? I can get the code below to work using IN, but if I want all of the records that are NOT IN, I get this error:

0 ERROR AT OR NEAR LINE 3 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC774) THE WORD 'IN' MUST APPEAR IN A VALID CLAUSE


 
TABLE FILE CAR
PRINT *
WHERE COUNTRY IN ('JAPAN', 'ITALY');
END 


Thanks,
Bethany

Server Environment:
Win2K3 Server
WebFOCUS 7.13
Apache Tomcat standalone application server


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
 
Posts: 188 | Registered: April 14, 2005Report This Post
Platinum Member
posted Hide Post
Here's one way:

 
TABLE FILE CAR
PRINT *
WHERE COUNTRY NE 'JAPAN' OR 'ITALY'
END 


Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Expert
posted Hide Post
TABLE FILE CAR
PRINT *
WHERE NOT COUNTRY IN ('JAPAN', 'ITALY');
END


Not very intuitive, is it?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
TABLE FILE CAR 
PRINT * 
WHERE NOT (COUNTRY IN ('JAPAN', 'ITALY'));
END


The brackets around the NOT are not required but I usually put them there for clarity, in case there's another clause in the WHERE statement.


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
Aha, I was just about to put that one too!

The NOT part needs to be put before the field being compared.


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Platinum Member
posted Hide Post
Definitely NOT INtuitive! Thanks for the help.

Bethany


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
 
Posts: 188 | Registered: April 14, 2005Report This Post
Guru
posted Hide Post
Hi Bethany,

I do not understand how this tool is beahaving differently from one installation to the other.
And here we are using the master file car.
I just copy the code you have posted and that was not working on your installation and without any changes it is Running.

TABLE FILE CAR
PRINT *
WHERE COUNTRY IN ('JAPAN', 'ITALY');
END
Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Expert
posted Hide Post
Majid,

Bethany wanted to know what the syntax was for using NOT. She didn't have it in her example because what she tried wasn't working for her. She already knew that her posted code worked but it wasn't what she wanted.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
Hi Ginny,

You are correct I should read carefully the posts.

Thanks


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report 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     Operator NOT IN ('X', 'Y', 'Z')

Copyright © 1996-2020 Information Builders