By 'fails', do you mean that zero records are retrieved?
There is probably a way of achieving this by using a conditional split based on record count (0 is one path, > 0 the other).
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin