Focal Point
Comparing null values

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7321050202

December 18, 2006, 11:21 AM
Moogle
Comparing null values
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
December 18, 2006, 11:44 AM
Prarie
SET NODATA = '.'

or what ever you would like it to be.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
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
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
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
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.