On Wed, 4 Jun 2003 19:10:50 -0700 (PDT) Robert <[EMAIL PROTECTED]> wrote:
Please stay on the list. Others might benefit or contribute.
In particular Igor's comments are especially appropo.
============
Why don't you:
1. remove single quotes from $ins_csr->execute('$db2data[1]');
2. show us your sql statements without typos and preferably with all
columns
listed (in this case you can avoid your nulls) like this:
my $sql = "insert into cover_tab (col1, col2, col3, ... , colN) " .
"values (?, ?, ?, ..., ?)";
============
> Thanks a lot Michael, my program which is crapy but works. Only problem
> I have is the comp_number which is a varchar which needs to be executed
> in quotes. I ran this program after making the changes as you suggested
> but it is still saying missing comma, but I know once I fix this varchar
> it will be ok.
Your program apparently is not working, or you wouldn't be asking
about it on dbi-users. The VARCHAR/NUMBER issue is not the problem,
as Igor suggested, please show us the actual script you got the error
messages from when I tried to figure out what line in the script the
errors came from, the line numbers did not match the script you showed
us.
> How do I pass $comp_num with quotes?
> $ins -> execute( '$comp_num' );, will it work if I pass single quotes
> within the brackets of execute?, I haven't tried yet.
Quotes are not necessary or useful if you are using placeholders.
The errors you are getting are *Oracle* errors, not Perl errors. If
you feed invalid SQL to DBI and DBD::Oracle, you should expect that.
--
Mac :})
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.