in reply to Re: 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.

Thanks a lot for your suggestion Moron.
I have modified my code as suggested by you. i.e using quotes for empty data.

But, actually I have to pass NULL values if the data passed to column is empty. But by using quotes, the value is stored as empty string in the database instead of NULLS.

Is there anyway to handle this in Perl script itself so that NULL values are passed to the SYBASE stored procedure when the data that is passed to the column is nothing(NULL or no data).

Thanks a lot to all the Perl Monks for your effort and time!!!

  • Comment on Re^2: Pass the values to the sybase stored procedure using DBI-Sybase module and exexute the procedure.

Replies are listed 'Best First'.
Re^3: Pass the values to the sybase stored procedure using DBI-Sybase module and exexute the procedure.
by Moron (Curate) on Jun 29, 2006 at 09:12 UTC
    What I meant to suggest was:

    - numeric data not have quotes in the RHS

    - string data should have quotes in RHS constant assignments

    - but empty data needs a null treatment - such as the NULL keyword.

    I avoided being specific because normally one needs to know more about the database design before suggesting what to do about nulls - it is common for some empty fields to be unnacceptable and whereas this can be controlled by a database constraint, it is now very popular to precontrol it at the data entry point rather than endure the overhead of submitting to the database.

    -M

    Free your mind