From: Christoph Haller <ch@rodos.fzk.de>
To: pgsql-sql@postgresql.org
Cc: liongliong@telkom.net
Subject: Re: conversi ms-sql7 vs postgresql 7.3
Date: Fri, 07 Feb 2003 10:59:50 +0100
Message-ID: <3E438396.2983BD2B@rodos.fzk.de> (raw)
>
> I have table xx:
> id debet credit balance
> 1 1000 0 0
> 2 2000 0 0
> 3 0 2500 0
> 4 0 100 0
>
> command in ms-sql 7 can use calculate field (column) balance from id=1
to
> id=4:
> "update xx set bal=balance=bal+debet-credit"
> result:
> id debet credit balance
> 1 1000 0 1000
> 2 2000 0 3000
> 3 0 2500 500
> 4 0 100 400
>
> How command sql can use in psotgresql 7.3?
>
Try
UPDATE xx SET balance=balance+debet-credit ;
Regards, Christoph
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ch@rodos.fzk.de, liongliong@telkom.net
Subject: Re: conversi ms-sql7 vs postgresql 7.3
In-Reply-To: <3E438396.2983BD2B@rodos.fzk.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox