in reply to dbi style questions (code, discussion)
If the SQL statement gets really big I would consider wrapping it into a sub, akamy $sqlstmt = <<SQL_A; select count(col1) from table1 where col1 = ? and col2 = ? and col3 = ? SQL_A
This is also consistent with hiding the gory details in a sub when creating "dynamic" SQL statements.my $sqlstmt = def_sql_a; sub def_sql_a { return <<SQL_A; select count(col1) from table1 where col1 = ? and col2 = ? and col3 = ? SQL_A }
|
|---|