Mar 2, 2004, 11:21 PM
Post #2 of 3
This is an SQL problem. Not a Perl problem. Please ask your questions in the appropriate place.
Re: [sanyukta] subquery not executing
[In reply to]
I think that your query would be better written as:
But it's also possible that you are using a database that doesn't support sub-selects. In that case you could rewrite it as:
select 1 from partitiondata where part_id in
(select part_id from Partition where part_name='$partition')
This changes the sub-select into a join.
from partitiondata d, partition p
where p.part_id = d.part_id
and p.part_name = '$partition'
Dave Cross, Perl Hacker, Trainer and Writer
Get more help at Perl Monks