[freeside-users] Help please.. Emergency..

Ryan Ghering rghering at gmail.com
Wed Sep 19 06:49:01 PDT 2012


We are upgrading from  2.1.3  to the latest build.

Output of that query came up with dozens of rows with 2's in the second
columns .


On Tue, Sep 18, 2012 at 4:50 PM, Jeff Finucane <jeff at cmh.net> wrote:

> On Tue, Sep 18, 2012 at 04:35:32PM -0600, Ryan Ghering <rghering at gmail.com>
> wrote:
> +----------
> | On upgrading to latest from 2.1.3 we are getting
> |
> | Upgrading cust_pkg...
> | DBD::Pg::st execute failed: ERROR:  more than one row returned by a
> | subquery used as an expression [for Statement "update cust_pkg set
> | order_date = (select history_date from h_cust_pkg
> |         where h_cust_pkg.pkgnum = cust_pkg.pkgnum and
> |         history_action = 'insert') where order_date is null"] at
> | /usr/local/share/perl/5.10.1/FS/cust_pkg.pm line 3685.
> | ERROR:  more than one row returned by a subquery used as an expression at
> | /usr/local/share/perl/5.10.1/FS/cust_pkg.pm line 3685.
> |
> | Our system is completely defunct at the moment, can't process payments,
> can
> | add services nada...
> |
> | Does anyone have an answer for this error??
> +----------
>
> From what version are you upgrading?
>
> It is curious that you have packages that have been inserted more than
> once.  Perhaps the best approach is to first determine the severity of
> the problem with something like
>
> select pkgnum, count(*) as number from h_cust_pkg where
> history_action='insert' group by pkgnum having count(*) > 1;
>
> If the number of rows is small (1?) perhaps removing offending
> h_cust_pkg rows is appropriate.  Alternatively one could set the
> order_date column in the corresponding cust_pkg row.  Perhaps prior
> intervention of this sort caused the problem.
>
> --
> jeff at cmh.net
>
> "There is no worse tyranny than to force a man to pay for what he does
>  not want merely because you think it would be good for him."
>
>  Professor Bernardo de le Paz
>   [ R.A. Heinlein -- "The Moon is a Harsh Mistress" ]
>
> _______________________________________________
> freeside-users mailing list
> freeside-users at freeside.biz
> http://freeside.biz/cgi-bin/mailman/listinfo/freeside-users
>



-- 
Ryan Ghering
Network Operations - Plains.Net
Office: 970-848-0475 - Cell: 970-630-1879
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://freeside.biz/pipermail/freeside-users/attachments/20120919/6c7743d8/attachment.html>


More information about the freeside-users mailing list