Hi
I have two queries, #1 is the main query, #2 is stored all exceptions.
#1
select * from table1 a
inner join table2 b
on a.id= b.id
where 1 =1
#2
select exception
from item a
where FKey_int = 55
it returned the exception results such as below
and item like '35%' or like '36%')
and (type = 1)
and warehouse <> 'TTT'
I need to combine two queries 1 and 2 into one below, but it returned 2 independ results. Can some one please help to put them into one query?
select * from table1 a
inner join table2 b
on a.id= b.id
where 1 =1
(select exception
from item a
where FKey_int = 55
)
thanks