in reply to Bug in DBI? (Surely Not??)

what happens when you execute this select from the isql> prompt? Do you get the same behavior if you just do a
isql>SELECT "999999999999.0012";
or execute that same query in your perl code?

It works fine for me with mysql. You may ping the sybperl mailing list or mpeppler or check out the docs at his page author of DBD::sybase.

Replies are listed 'Best First'.
Re: Re: Bug in DBI? (Surely Not??)
by Kevman (Pilgrim) on Jun 14, 2002 at 14:57 UTC
    Comes back correct Eg. with the .0012 Code I select is:-
    SELECT internal_id, ctrpty_id, agreement_number, master_agreement_type, agreement_type, agreement_ccy, one_two_way, business_unit, substitution, recall_period, reset_agreement, valuation_freq, our_threshold_marker, our_threshold_ccy, our_threshold_amount, cparty_threshold_marker, cparty_threshold_ccy, cparty_threshold_amount, our_mta_ccy, our_mta_amount, cparty_mta_ccy, cparty_mta_amount, finance_net_amount, finance_nominal, finance_base_ccy, gcs_pre_haircut, gcs_post_haircut FROM history..collateral_agreement_h WHERE effective_to = '01-jan-2079' AND internal_id = 1059 AND ctrpty_id = 2383
      Please post the perl code that you use to retrieve records.

      --dda

      Just for giggles you could try and cast it to a varchar and see what you are getting - to keep the debugging simple I would just stick with the simpliest SQL that reproduces your bug, i.e. SELECT 9999999999999.012. I'm forgetting my transact-SQL syntax but something like SELECT varchar(999999999999.021) and see what perl reports - that BETTER work. I'm guessing there is some sort of binding under the hood to a NUMERIC which is not recognizing the precision length of your query. Making a bug report with just this simple example would allow mpeppler to hopefully reproduce and identify the problen quickly. Of course your version of DBD::sybase is the most recent and you're not using an ancient sybase version, right?