hello, is the output calculated by following rule?
on_hand SUM(receipt) - SUM(shipment) - SUM(allocated)
available SUM(receipt) - SUM(shipment)
sql can be:
sum(case when trans_type='REC' then trans_qty when trans_type IN ('SHP', 'ALL')
then -trans_qty else 0) as on_hand
sum(case when trans_type=
elf character varying(2),
> matrix character varying(2),
> CONSTRAINT ss_item_tran_key PRIMARY KEY (id)
>
> You'all have me thinking. Thanks for taking time to
> educate me.
>
>
> On Tue, 2013-09-24 at 14:22 +0800, DDT wrote:
> > hello, is the output calculated
thanks.
-- Original --
From: "Chris Travers";;
Date: Wed, Sep 25, 2013 10:46 PM
To: "DDT"<410845...@qq.com>;
Cc: "bret_stern";
"pgsql-general";
Subject: Re: [GENERAL] ??[GENERAL] SP to calc shipments vs
Is your table have only pkey one field and the sql is the exact same sql you
use?
If you have more than one field to insert, DISTINCT ensure the whole row values
set are distinct instead of one field value. that't maybe a reason for your
situation.
-- Original --
Dear,
Append following command to crontab:
D=`date -d -5day +"%Y%m%d"`;echo "DROP DATABASE test_db_$D" | psql
Maybe you should change the "psql" to your psql path.
-- Original --
From: "Andreas";;
Date: Fri, Oct 25, 2013 09:53 AM
To: "pgsql-general";
Dear
According to manual, when you set "synchronous_commit" to on, the transaction
commits will wait until master and slave flush the commit record of transaction
to the physical storage, so I think even if turn off the fsync on master is
safe for data consistency and data will not be lost if s