in reply to Re: perl dbi select question
in thread perl dbi select question

ok

let say that tableA has 2 columns x and y and let say that data in column y is corresponds to data in tableB (only one column z). now what i want to do is to pick every data in column x that has data y in tableB column z. and if it does than print it to a file.

printing is not the problem, the problem is to check it for every record and then evaluate it to truth, so if it is truth than do something with it but if it is not skip it.

thanx

Replies are listed 'Best First'.
Re^3: perl dbi select question
by psini (Deacon) on May 12, 2008 at 13:04 UTC

    ok, so you need a full join:

    SELECT DISTINCT tableA.x FROM tableA,tableB WHERE tableA.y=tableB.z

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