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]LIKE operator in Where
Go
New
Search
Notify
Tools
Reply
  
[Solved]LIKE operator in Where
 Login/Join
 
Platinum Member
posted
Hi,

I have a requirement where i need to use LIKE operator in where clause.
I figured out how to use it.
  
--other where clause--
AND DIM_LOCATION.ADDRESS_LINE_1 LIKE '%&ADDRESS|%'

The address parameter is not a mandatory input and if the user is not filtering for Address it will pass _FOC_NULL and in that case
my whole report given empty data because the where clause filter for

  
--other where clause--
AND DIM_LOCATION.ADDRESS_LINE_1 LIKE '%_FOC_NULL%'


I think it should be
AND DIM_LOCATION.ADDRESS_LINE_1 LIKE '%_FOC_NULL%',but when the user filters for some address then it should be AND.

Any logical workaround to tackle this situation?

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


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 198 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Can you use a second WHERE ADDRESSLINE LIKE instead of using AND? That way what happens to the second where test doesn't effect the first one.
  
WHERE first condition;
-IF &ADDRESS EQ _FOC_NULL GOTO SKIP;
WHERE second condition;
-SKIP


WebFOCUS 8204, Unix, Windows
 
Posts: 1617 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks BabakNYC it worked.


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 198 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]LIKE operator in Where

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