in reply to Multiple sql statements in one sql file
There are several problems, first of which is that your SQL file doesn't just contain SQL. It also contains commands that sqlplus uses to format the output. It would be easier to help if you'd provided some of your DBI code that failed.
The interesting bits of your converted script should be something like:
my $ST = $DB->prepare('select * from side_table'); $ST->execute; while (my $hr=$ST->fetchrow_hashref) { # Print formatted columns printf "% 8u ", $$hr{FIRST_COLUMN}; printf "%12.2f ", $$hr{COLUMN_2}; ...etc... printf "%-200.200s\n", $$hr{XXX}; }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multiple sql statements in one sql file
by leo_jeo (Initiate) on Nov 29, 2011 at 04:31 UTC | |
by roboticus (Chancellor) on Nov 29, 2011 at 10:44 UTC | |
by leo_jeo (Initiate) on Nov 30, 2011 at 16:26 UTC | |
by leo_jeo (Initiate) on Dec 06, 2011 at 04:48 UTC |