in reply to Re^2: Pass the values to the sybase stored procedure using DBI-Sybase module and exexute the procedure.
in thread Pass the values to the sybase stored procedure using DBI-Sybase module and exexute the procedure.

So, if you need to create the SQL statement including the values as a string, have you looked at the quote method of DBI? I find it very helpfull to first try out my SQL in the SQL shell (isql for Sybase I think) and when I'm satisfied with the SQL statement to reproduce that statement in my Perl code. Have you done that already?

  • Comment on Re^3: Pass the values to the sybase stored procedure using DBI-Sybase module and exexute the procedure.
  • Select or Download Code

Replies are listed 'Best First'.
Re^4: Pass the values to the sybase stored procedure using DBI-Sybase module and exexute the procedure.
by Anonymous Monk on Jun 27, 2006 at 13:14 UTC
    I am using the qq!......! for quoting the sql statements.
    Should I need to replace this with $sql=$dbh->quote(......).
    Please suggest.
    DBD::Sybase accepts the NULL for null values.

      Please, please read the documentation on the quote method to learn what it is used for. Also, print out your SQL statements before passing them to your database, and think about what will happen when you have a string with whitespace in it. Actually, have you tried typing any of your SQL statements manually into your interactive SQL shell? Some values, namely, strings, need quoting to be valid in SQL. So you will need to add proper quotes around all the values that are strings.