Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJKem-0004PP-QN for pgsql-general@arkaria.postgresql.org; Fri, 18 Sep 2020 17:58:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kJKek-0000YC-By for pgsql-general@arkaria.postgresql.org; Fri, 18 Sep 2020 17:58:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJKei-0000Xt-TM for pgsql-general@lists.postgresql.org; Fri, 18 Sep 2020 17:58:46 +0000 Received: from [66.111.4.28] (helo=out4-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJKeg-000855-2i for pgsql-general@lists.postgresql.org; Fri, 18 Sep 2020 17:58:43 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id DFB125C00E2; Fri, 18 Sep 2020 13:58:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 18 Sep 2020 13:58:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=x aJ1itY5o9SUd3uYbIYc6Kbo9hGpzlRTjt72zVVP5iA=; b=RbLDwJjX2plpQmVJv nWa2iTugntw0Q/9xB+jUXadjbYkj9LsnJ3SUXfLaE6hpmD+nYsKxhOqrkB/EVlz2 QyHQOkROF2ieBXNP+flTjaZF5DTd0e1Lpe4YJ3vFiTw5cwL6N5JxbIl9JnwAfRkI ZBPStPeND1FCKxRgXU9zkKLZcRF+r3QOV9qdvG9tpBEE1U1h5EG1cUBcFzlYtlcK jg0bkR6b8aEJ+L4v0Zy7Tc0UicIHZGaic+LzuNKoBlwpihuCk6DztYOxhxTFgU4I qPgzUDyUtyb+eZlfox5XwhiynC3SPXIxWng9UESqYiWNb3IXsmst6nEvKYrNav2V gYxCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=xaJ1itY5o9SUd3uYbIYc6Kbo9hGpzlRTjt72zVVP5 iA=; b=uGYV+nafjKedkzaGNVLsDnCPJ0LDIYSZMUj8SV6hCh+AaENyxqVMtY8aI aj5xHkgdHj6d0bXP6kub7gaxq6hTh1THnOSeyGFdW0khNU4pQEZzmOWL1kMAfIHJ /DDqf/se+Gx2gClBlpm+jleiv4z6JngmODYN7Tbjew/+7Ci30HO8ua2O8CS9sY7/ w8fHigeS8Ku7uwkzCZq+RkjKNEaZBthwZP1VB9axzawzbxficsv9eBD6lyowRnGe 9UqRk7pHluZGlnMSYW46zSETCi9zfjp/2fd34wa4Vrjkl2OdzwetIkR60f4xLIMG guMS5AUjr8YzCaYFnMDElhDpgNW0A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrtdeigdduvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeetjedvteffjeeuvdelieeffeehuedthffgvdfhhffh kedvudevgedvjedufefgveenucfkphephedtrdduleejrdektddrvdenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghv vghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from ranger.suse (50-197-80-2-static.hfc.comcastbusiness.net [50.197.80.2]) by mail.messagingengine.com (Postfix) with ESMTPA id 0C4433064683; Fri, 18 Sep 2020 13:58:29 -0400 (EDT) Subject: Re: How to write such a query To: Igor Korot , Jonathan Strong Cc: pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <912dd33c-c837-a226-111f-413fcb7321c1@aklaver.com> Date: Fri, 18 Sep 2020 10:58:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.28 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/18/20 10:46 AM, Igor Korot wrote: > Hi, Johnathan, > > On Fri, Sep 18, 2020 at 12:34 PM Jonathan Strong > > wrote: > > Are you looking to arbitrarily update the field in the fifth row, or > can the row that needs to be updated be isolated by some add'l > attribute? What's the use case? > > > What do you mean? > I don't have any other attributes. > > I want to understand how to emulate MS Access behavior, where you have a > form > with the arbitrary query, then you can go to any record in that form and > update any field. > > Is it even possible from the "pure SQL" POV? Or Access is doing some > VBA/DB/4GL magic? > When you are updating a record in a form the framework(Access in your case) is using some identifier from that record to UPDATE that particular record in the database. From when I used Access, I seem to remember it would not give you INSERT/UPDATE capability on a form unless you had specified some unique key for the records. So you need to find what the key(generally a PRIMARY KEY) is and use that to do the UPDATE. > Thank you. > -- Adrian Klaver adrian.klaver@aklaver.com