Skip to Content
0
Former Member
May 11, 2010 at 02:24 PM

How can we reduce this to single query???

18 Views

I need record from table1 where field matches the data of other table OR belongs to some date.

Select field

from table1

into table result1

where ldate = p_date.

Select field

from table1

into table result2

for all entires in table2

where field1 = table2-field1

Loop at result1.

result-field = result1-field.

append result.

Endloop.

Loop at result2.

result-field = result2-field.

append result.

Endloop.

Please suggest.