Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YEZSm-0006El-Ok for pgsql-admin@arkaria.postgresql.org; Fri, 23 Jan 2015 08:19:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YEZSm-0005i2-9l for pgsql-admin@arkaria.postgresql.org; Fri, 23 Jan 2015 08:19:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YEZSl-0005hw-8R for pgsql-admin@postgresql.org; Fri, 23 Jan 2015 08:19:31 +0000 Received: from eu1sys200aog120.obsmtp.com ([207.126.144.149]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YEZSi-00008D-33 for pgsql-admin@postgresql.org; Fri, 23 Jan 2015 08:19:30 +0000 Received: from mail-wi0-f179.google.com ([209.85.212.179]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKVMIEDKD7/6daH+qOMKdtmyU2g5sjmx3E@postini.com; Fri, 23 Jan 2015 08:19:28 UTC Received: by mail-wi0-f179.google.com with SMTP id l15so1032834wiw.0 for ; Fri, 23 Jan 2015 00:19:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:thread-index:date:message-id :subject:to:content-type; bh=1A5uIGZw4HDarW2dJRJMh1jfKFlVTcuMhxh387Yp6QM=; b=NGeGy1Mfu8CZxWsh7dv/9qhHKnwcv+X2l6+f8QgI81Tlofbdg+JUUVWQ2pZ4pRUQbq 932QYv2QkoTxFs9Ym23dST2YaS6OL1RcXdbdgzCcDu/0dqFeQpn+0dXcBWeG3vktiTou O4mTT9RrP+NKCjBMN+tgyE/uteC4GGHKMCmmcp/nCW+0urY8DJsDYecnABZWYKjW7lVJ +A1SOa+Anbx+k5LX4hd20VgGjS7xmcAhQ03yjBmKsjAMr7fqlZ9HMbzgRT7V1iBhW3RH 406lvthx1JeRIbqPpeTbwLXadJfpYq1va0k8IBTeAy8hFF8c4JXmU5ytFgRvny7xtKJa 9IBg== X-Gm-Message-State: ALoCoQneMKSLwnpTp7QUhB+If+SqrOsg4s6YarKlKAbW7cY+iRSfMxAm2B2g6t+Mq2MMJ9DF2XzTgmmKqjKb5R6Dt/fOKDFACTDYslSrJV3PnpsaycMomAUSty8GaqIZecSrFez1y6mTF1CFMzkNdDE5mOrNqM4OWg== X-Received: by 10.180.98.162 with SMTP id ej2mr1171200wib.39.1422001163986; Fri, 23 Jan 2015 00:19:23 -0800 (PST) X-Received: by 10.180.98.162 with SMTP id ej2mr1171190wib.39.1422001163915; Fri, 23 Jan 2015 00:19:23 -0800 (PST) From: Khangelani Gama MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 thread-index: AdA25Uq8VoDKUCKsRQm2y4kxZXXF4w== Date: Fri, 23 Jan 2015 10:19:22 +0200 Message-ID: Subject: PostgreSQL 9.2.4 - please assist with the query To: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=f46d044282743eeab5050d4d726c X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --f46d044282743eeab5050d4d726c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi I need help, I need to change every result with x being 71008 to be 71007 in the select query below. SELECT x, sum( value ) as value from table where =E2=80=A6=E2=80=A6.. Results will show as follows but if the query finds x as 71008 then it must make it 71007 instead. Is this possible? 71015 | 101240.00 71008 | -19351.34 CONFIDENTIALITY NOTICE The contents of and attachments to this e-mail are intended for the addre= ssee only, and may contain the confidential information of Argility (Proprietary) Limited and/or its subsidiaries. An= y review, use or dissemination thereof by anyone other than the intended addressee is prohibited.If you are not the intend= ed addressee please notify the writer immediately and destroy the e-mail. Argility (Proprietary) Limited and its subsidiari= es distance themselves from and accept no liability for unauthorised use of their e-mail facilities or e-mails sent other tha= n strictly for business purposes. =0D --f46d044282743eeab5050d4d726c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi

=C2=A0

I need help, I need to change every resul= t with x being 71008 to be 71007 in the select query below.

=C2=A0

SELECT =C2=A0x, sum( value ) as= value from table where =E2=80=A6=E2=80=A6..

=C2= =A0

Results will show as follows but if the query= finds x as 71008 then it must make it 71007 instead. Is this possible?

=

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0

71015 | = =C2=A0101240.00

71008 |=C2=A0 -19351.34

=C2=A0 =C2=A0

=C2=A0

=C2=A0

=C2=A0

=C2=A0


CONFIDENTIALITY NOTICE
The contents of and attachments to this e-mail are intended for the addre=
ssee only, and may contain the confidential
information of Argility (Proprietary) Limited and/or its subsidiaries. An=
y review, use or dissemination thereof by anyone
other than the intended addressee is prohibited.If you are not the intend=
ed addressee please notify the writer immediately
and destroy the e-mail. Argility (Proprietary) Limited and its subsidiari=
es distance themselves from and accept no liability
for unauthorised use of their e-mail facilities or e-mails sent other tha=
n strictly for business purposes.
=0D
--f46d044282743eeab5050d4d726c--