my $sql1 = qq { SELECT a.*, b.*, c.* FROM table1 a, table2 b, table3 c WHERE a.primary_key = b.foreign_key and a.foreign_key2 = c.foreign_key2 };