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     [SOLVED]Parameters with Null Values
Go
New
Search
Notify
Tools
Reply
  
[SOLVED]Parameters with Null Values
 Login/Join
 
Member
posted
Hi,

I have multiple parameters, but one of them has null values. Tried to create a SET with the WHERE statement.

Is there a way to do this so that it captures the null values?

-SET &DEC = IF &DEC NE 'Y' OR &DEC EQ MISSING THEN 'FOC_NONE' ELSE &DEC;

WHERE J3.SEG01.DECEASED EQ &DEC.(OR
(,
)).Deceased.;

thanks.

This message has been edited. Last edited by: DG,


WebFOCUS 7.702
Windows, All Outputs
 
Posts: 27 | Registered: February 17, 2011Reply With QuoteReport This Post
Expert
posted Hide Post
I think you need to find out what is passed to the amper variable when its NULL, so you can code your test correctly.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6131 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
If the values are truly null, it seems to me that the variables would contain the null value ".". If so, something like this might work.

-SET &DEC = IF (&DEC NE 'Y') OR (&DEC EQ '.') THEN 'FOC_NONE' ELSE &DEC ;


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Reply With QuoteReport This Post
Member
posted Hide Post
That recommendation sort of worked.

Not getting all records because even though I've denoted UNIQUE LEFT OUTER JOINs, TABLE_THREE does not have the same count of unique records as the other tables. It only includes records that have a certain field populated.

BTW, I have my joins in "serial" order instead of "star" to expedite run times.

Is there a way around this?

JOIN
LEFT_OUTER TABLE_ONE.TABLE_ONE.FIELD_1 IN TABLE_ONE TO UNIQUE
TABLE_TWO.TABLE_TWO.FIELD_1 IN TABLE_TWO TAG J0 AS J0
END
JOIN
LEFT_OUTER J0.TABLE_TWO.FIELD_1 IN TABLE_ONE TO UNIQUE
TABLE_THREE.TABLE_THREE.FIELD_2 IN TABLE_THREE
TAG J8 AS J8
END
JOIN
LEFT_OUTER J8.TABLE_THREE.FIELD_2 IN TABLE_ONE TO UNIQUE
TABLE_FOUR.TABLE_FOUR.FIELD_1 IN TABLE_FOUR TAG J1 AS J1
END
JOIN
LEFT_OUTER J1.TABLE_FOUR.FIELD_1 IN TABLE_ONE TO UNIQUE
ADR_HOLD.SEG01.FIELD_2 IN ADR_HOLD TAG J3 AS J3
END


WebFOCUS 7.702
Windows, All Outputs
 
Posts: 27 | Registered: February 17, 2011Reply With QuoteReport This Post
Virtuoso
posted Hide Post
If these are FOCUS tables, try setting ALL=ON, or ALL=PASS if you have WHERE clauses on any of the JOIN TO tables. Otherwise, can you take TABLE_THREE out of the serial JOIN sequence and make it a "star" join?


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Reply With QuoteReport This Post
Member
posted Hide Post
I will try both suggestions and see which one runs faster.


WebFOCUS 7.702
Windows, All Outputs
 
Posts: 27 | Registered: February 17, 2011Reply With QuoteReport This Post
Member
posted Hide Post
STAR join fixed the problem.


WebFOCUS 7.702
Windows, All Outputs
 
Posts: 27 | Registered: February 17, 2011Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Parameters with Null Values

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