我正在尝试运行一个查询,其中有一个子选择。我已经设置了 Manager 方法,一切正常。唯一的问题是我不知道如何继续这个查询:
SELECT * FROM tableA WHERE
name = 'Me' AND
class='Tester' AND
( ( Department IN ( SELECT Department FROM
tableB WHERE
leader = 'Joe')
OR
Leader in ('','all') )
);
重要的是要记住 tableA 和 tableB 是 2 个不同的表。到目前为止,我已经达到了这个查询:
my @leader = ('','all');
DB::tableA::Manager->get_tableA ( with_object => ['tableB'] ,
query => [ name => 'Me',
class => 'Tester',
OR => [
leader => \@leader,
Department => [*** this is
where i have to make the sub select.
Dont know how though **** ]
]
],
debug => 1);
请帮忙,以便我可以将该子查询添加到此主查询
提前致谢