🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #645

Re: SQL statement w/sum()

#645
From: Steve Koterski
Date: Mon, 27 Jul 1998 00:00
21 lines
1451 bytes
On Mon, 27 Jul 1998 10:47:42 -0500, "Christopher F. Neumann"
<CNeumann@Physix.com> wrote:

>What causes a SQL statement to get a table as readonly if you run the
>following:
>
>        select sum(myfield) from mytable
>
>BUT, if it is in a SQL file, no problem!

*All* queries that aggregate data should be read-only. You are, after all,
combining the values of multiple rows into one. Which of those multiple
rows would you have updated by changes in the query result set? How should
a sum of your MyField column values be editable (as it is a total and not
an actual column value)?

//////////////////////////////////////////////////////////////////////////
Steve Koterski                      "Knowledge comes, but wisdom lingers."
Technical Publications                -- Alfred, Lord Tennyson (1809-1914)
INPRISE Corporation
http://www.inprise.com/delphi
Technical Details
Message-ID: <35c4b90c.7627186@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6pi7gb$93q5@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,8171ca373096da47
X-Google-Attributes: gidff5a1,public
From: koterski@borland.com (Steve Koterski)
Subject: Re: SQL statement w/sum()
Date: 1998/07/27
Message-ID: <35c4b90c.7627186@forums.inprise.com>
X-Deja-AN: 375372656
Content-Transfer-Encoding: 7bit
References: <6pi7gb$93q5@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: INPRISE Corporation, Technical Publications
Mime-Version: 1.0
Reply-To: koterski@borland.com
Newsgroups: borland.public.vdbase.data.sql