in reply to perl dbi select question

Not too clear... :) Tell me if I did understand.

You have two tables (tableA and tableB) and wou need to match rows from tableA with rows from tableB. To do so I assume there is a column (say 'foo') in tableA you want to match with another column (sat 'bar') in tableB .

If all you need is to know how many rows in tableB match each row in tableA, the following SQL should be enough:

SELECT *,(SELECT count(*) FROM tableb WHERE tablea.foo=tableb.bar) FROM tablea

Rule One: Do not act incautiously when confronting a little bald wrinkly smiling man.

Replies are listed 'Best First'.
Re^2: perl dbi select question
by baxy77bax (Deacon) on May 12, 2008 at 13:24 UTC
    that is it !