I wrote and SQL query with a sub query. How do I include this sub query when I am creating a report using version XI?
Here is the query:
SELECT Table 1 . item_no ,
Table 1 . item_desc ,
Table 2 . location ,
Table 2 . qty ,
Table 3 . price ,
Table 3 . period ,
Table 1 . sold
FROM ( B003C5EA . Database . Table 2 Table 2
INNER JOIN Database1.Table 1 Table 1 ON Table 2.item_no = Table 1.intem_no )
INNER JOIN Database1.Table 3 Table 3 ON ( Table 2.item_no = Table 3.item_no)
AND ( Table 2.location = Table 3.location )
WHERE Table 1 .Type ='STK' AND
Table 1 .item_no not in (select Table 4 . item_no
from Database1.Table 4
where Table 4 . loction = '999') and
Table 3.period between '200900' AND '200910'