Focal Point
[CLOSED] Empty value in WHERE caluse

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

September 08, 2020, 08:46 AM
Maran
[CLOSED] Empty value in WHERE caluse
Hi,

I have a report which has a drill-down report. Some times we'll get an empty value in drill column. If we click on empty value for drill report, I'll add the
'TOTAL' 
in WHERE clause like below.
WHERE TOTAL <Column_Name> EQ ' ' 


Without 'TOTAL' in the WHERE clause, the report getting 0 records for empty value.

While using 'TOTAL', the report reading the entire base and then retrieves the Empty records correctly. So the report taking a long time to retrieve output for Empty value.

Is there any other way to pull empty records? or how to compare/filter empty value in WHERE clause?

I tried the MISSING=ON but it's not working in my report.

I'm using AP version 8105m.

Thanks.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8201m
Windows,AppStudio, DevStudio,All Outputs
September 09, 2020, 08:17 AM
Frans
WHERE COLUMN EQ MISSING


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
September 09, 2020, 11:03 AM
Maran
Hi Frans,

thanks for your reply. I already tried your code but it's not working as expected.


WebFOCUS 8201m
Windows,AppStudio, DevStudio,All Outputs
September 09, 2020, 12:25 PM
FP Mod Chuck
Maran

Your WHERE statement has a blank space between the tick marks. Try this

WHERE TOTAL Column_Name EQ ''


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
September 09, 2020, 12:35 PM
Maran
Chuck,

If I use TOTAL in WHERE, I'm getting the report correctly. But it takes long time to run. That is the issue.


WebFOCUS 8201m
Windows,AppStudio, DevStudio,All Outputs
September 09, 2020, 01:17 PM
FP Mod Chuck
Maran

How many records is it processing?


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
September 09, 2020, 01:34 PM
Maran
Chuck,
It's processing around 150K records. If we use TOTAL in WHERE clause, it processing entire base and then retrieves Empty value records. That's why it takes time.


WebFOCUS 8201m
Windows,AppStudio, DevStudio,All Outputs
September 09, 2020, 02:14 PM
FP Mod Chuck
Maybe this is one of those queries you either need run deferred or schedule on whatever basis is required.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
September 11, 2020, 04:32 AM
Frans
First you need to know how the data is stored on the DB. Is it null, 0, '' or ' ' to avoud using TOTAL you can try to use DB_EXPR to use some native SQL to filter this data.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
September 11, 2020, 08:49 AM
Maran
quote:
Is it null, 0, '' or ' ' to avoud using TOTAL you can try to use DB_EXPR


Frans,

thanks for your reply. I'll check on DB_EXPR.


WebFOCUS 8201m
Windows,AppStudio, DevStudio,All Outputs