Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Comparing null values
Go
New
Search
Notify
Tools
Reply
  
Comparing null values
 Login/Join
 
Guru
posted
Hi Team,

I have a report that is comparing two data sources together, to make sure they match. One of the data sources is on SQL server and the other is probably on Oracle (I can find out for sure if it is important). In one data source, the null values are showing as a space and in the other they are showing as a period when I run the report. Using an IF statement (IE. IF FIELD1 NE FIELD2 THEN "No Match"), these fields are not matching.

Can anyone suggest something for me to normalize my null value fields so they will match?

Cheers,

Joey


-WebFOCUS 8.2.01 on Windows
 
Posts: 319 | Location: Los Angeles, CA | Registered: November 15, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
SET NODATA = '.'

or what ever you would like it to be.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Thank you for the quick reply, Prarie.

I tried this out, and it seems to only affect the display of the report output. The comparison between the two fields is still failing to generate a match.

I am thinking of doing a define for both the fields that checks if they are null and sets them to a bogus value ("Null"), just to compare the two. I'll let you know how that goes.

Cheers,

Joey


-WebFOCUS 8.2.01 on Windows
 
Posts: 319 | Location: Los Angeles, CA | Registered: November 15, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Joey
the NODATA symbol is as you detected just an edit mask, not anything about the content of the field.
I'm thinking that matching on two non-existent values is, philosphically, not actually possible. They each specifically dont' exist.
Could you, define two new fields
SQLEMPTY/I1=IF field1 IS MISSING THEN 0 ELSE 1;
etc
and use those dummy fields as the basis for comparison?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Master
posted Hide Post
If you have a SQL and Oracle data sources wf will manage the comparison so it is possible to test null against something.

WHERE F1 EQ F2 OR F1 EQ MISSING AND F2 EQ ' ';

Should do the job if F1 is the field that appears as a dot and F2 the blank.



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, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Hi all,

FYI, Joey was able to do a DEFINE that checked for IS-NOT MISSING and also for NE '', and replaced the contents with a 0 or the actual value. Both fields compare properly now.

Thanks for everyone's input. Wish you all have a happy holiday! Big Grin

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1950 | Location: New York | Registered: November 16, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Comparing null values

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.