using UPDATE with GROUP By
william humphrey
bill at bluewatermaritime.com
Tue Jun 22 09:25:37 CDT 2010
Thank you Ivan. That work exactly as I wished. I don't know if I will
ever learn to write SQL like that.
Bill
On Tue, Jun 22, 2010 at 3:18 AM, Ivan Smahin
<ivan_smahin at paradigmasoft.com> wrote:
> Hello william,
>
> Monday, June 21, 2010, 7:35:49 PM, you wrote:
>
>> Yes that is exactly one of the groups I wish to update.
>
> It should be something like this:
>
> UPDATE
> data_address
> SET
> d_address_LineNumber = 2
> WHERE
> RecID IN (
> select
> rec
> FROM
> (select
> t1.RecID as rec,
> t1.d_address_LineNumber,
> count(t1.RecID) as s
> FROM
> data_address t1,
> data_address t2
> where
> t1.d_address_clients_ref = t2.d_address_clients_ref
> group by
> t1.RecID,
> t1.d_address_LineNumber
> having s = 2
> )
> )
>
>
> Check it please carefully.
>
>
> --
> Best regards,
> Ivan Smahin
> Senior Software Engineer
> Paradigma Software, Inc
> Valentina - The Ultra-Fast Database
> http://www.valentina-db.com
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
--
http://www.bluewatermaritime.com
More information about the Valentina
mailing list