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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
NULL 'vs' zero
 Login/Join
 
Silver Member
posted
Hi All -
Is there a way to seperate 'NULL' & 0 for an INT column of a 'SQL server' data source.

I am using SQLpassthru & trying to code in a Filter for 'NULL' like:

-SET NODATA = '' ;
-SET &WHERE = IF &VAR1 EQ '' THEN 'WHERE VAR IS NULL' ELSE 'WHERE VAR =' | &VAR1

SQL SQLMSS PREPARE SQLOUT FOR
SELECT * FROM TABLE WHERE &WHERE

The problem is this logic is not taking 'WHERE VAR = 0' For a zero value coming from data source.

-Any suggestions, much appreciated!

Thanks,
-Kal.


----------------------------------
WFS - V7.6.8 Servlet on Win2k3 VM, Tomcat, ResourceAnalyzer;
DevStudio - R7.6.8, FlexEnable,VisDis; MRE/BID/self-service/Rcaster/ Office2k3;
DB-SQL2005;
 
Posts: 33 | Location: MN | Registered: May 17, 2005Report This Post
Virtuoso
posted Hide Post
Why not just write

SELECT * FROM TABLE
WHERE VAR IS NULL OR 0;

I tried this in access

SELECT *
FROM Table1
WHERE (((Table1.var) Is Null)) OR (((Table1.var)=0));




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, 2006Report This Post
Platinum Member
posted Hide Post
Kal,

Can't tell for sure, but you're problem may relate to the way Dialogue Manager treats zero in DM variables. I copies this from an IBI advanced search entry. Maybe it's relevant. Maybe not.

Symptom:

How to distinguish between a dot, a blank and a zero, in Dialogue Manager


Problem:

Dialogue Manager treats incoming values as either character strings or
numeric strings. Problem is that character string can contain numbers.
The ASIS function was created for this purpose


Solution:

-*ET &INPT='0';
-*ET &INPT=' ';
-SET &INPT='.' | X;
-SET &OUTPUT = IF ASIS(&INPT) EQ ' ' THEN 'BLANK' ELSE
-IF ASIS(&INPT) EQ '0' THEN 'ZERO' ELSE
-IF ASIS(&INPT) EQ '.X' THEN 'DOT' ELSE 'OTHER';
-TYPE &INPT &OUTPUT


dwf
 
Posts: 135 | Location: Portland, OR | Registered: March 23, 2005Report This Post
Silver Member
posted Hide Post
Hi Frank -
That was my issue- that the DM is giving a null for even a '0' value in the database & I wanted to differentiate! Thanks for your timely response!

Hi Dwf -
ASIS() worked!!
The explanation was very helpful, Thanks very much!!

Regards,
Kal.


----------------------------------
WFS - V7.6.8 Servlet on Win2k3 VM, Tomcat, ResourceAnalyzer;
DevStudio - R7.6.8, FlexEnable,VisDis; MRE/BID/self-service/Rcaster/ Office2k3;
DB-SQL2005;
 
Posts: 33 | Location: MN | Registered: May 17, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders