Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!mailrus!cornell!rochester!pt.cs.cmu.edu!sei!dmc From: dmc@sei.cmu.edu (Dawn Cappelli) Newsgroups: comp.databases Subject: Re: Update in INGRES via view Message-ID: <3352@fp.sei.cmu.edu> Date: 12 May 89 14:17:44 GMT References: <7501@spool.cs.wisc.edu> Reply-To: dmc@sei.cmu.edu (Dawn Cappelli) Organization: Software Eng. Inst.;Carnegie-Mellon U.; Pittsburgh, PA 15213 _USA_ Lines: 30 In article <7501@spool.cs.wisc.edu> beverly@ai.cs.wisc.edu (Beverly Seavey) writes: > > Is it possible to do updates in INGRES via views? You can update through views in INGRES, except for the following situations: - You can't update the columns in the search condition of the view definition - You can't update columns that are set functions or computations - You can't update on views that have more than one base table. This information is in the INGRES Application Developer's Training manual. However, views are theoretically for VIEWING data, and really shouldn't be used for updating. You can use the view for retrieving the data and displaying it on the form, but why not just update the base tables directly then using the acid number (which can be placed in a hidden field when the data is retrieved)? I believe that updating through views is not legal in ANSI standard SQL, so you're better off avoiding that capability, even though it does exist. -- Dawn Cappelli dmc@sei.cmu.edu Software Engineering Institute (412) 268-6170 Carnegie Mellon University Pittsburgh, PA