Re: Need SQL help: replace multiple rows in table with single row

From: E A Macnaghten <ar02_at_dial.pipex.com>
Date: 1995/04/11
Message-ID: <3mei32$4kt_at_vent.pipex.net>#1/1


A solution would be first to convert the "c"s back to "a"s and to re-insert the "c"s..

UPDATE T1
SET A = 'a'
WHERE A = 'c'

INSERT INTO T1(A, B)
SELECT 'c', SUM(B)
FROM T1
WHERE A = 'a'

DELETE FROM T1
WHERE A = 'a'

I hope this helps

Yours ever

Eddy Received on Tue Apr 11 1995 - 00:00:00 CEST

Original text of this message