0

I am trying to use a select statement where the values of a field depend on values from 2 windows. Also a where statement is used at the end to filter out event from 1 wiondow. Eg.

Select 
coalesce(B.field1,0) + A.field1 as field1,
coalesce(B.field2,0) + A.field2 as field2
from 
Window1 A unidirectional,
Window2 B 
where A.field3<>B.field3 and a.field4=B.field4;

The problem is I want to output the event even when there are no matches. So that the B stream is treated as null.

puneet
  • 769
  • 1
  • 9
  • 34

1 Answers1

0

Use an outer join. Your text says stream A is treated as null however currently A triggers triggers the join, so what should trigger when no A arrives, perhaps time, if time then use a pattern to fire say every 15 sec.

user650839
  • 2,594
  • 1
  • 13
  • 9
  • I have edited the names of streams a bit to correctly reflect the scenario. B stream should be treated null. Thanks – puneet Apr 23 '13 at 13:50