Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!julius.cs.uiuc.edu!apple!agate!shelby!portia.stanford.edu!mouser From: mouser@portia.Stanford.EDU (Michael Wang) Newsgroups: comp.databases Subject: Re: Still need help referencing globals in ORACLE SQL*FORMS triggers Message-ID: <1990Sep13.185628.12429@portia.Stanford.EDU> Date: 13 Sep 90 18:56:28 GMT Sender: mouser@portia.Stanford.EDU (Michael Wang) Organization: AIR, Stanford University Lines: 32 In article <11240@spool.cs.wisc.edu>, beverly@ai.cs.wisc.edu (Beverly Seavey (-Kung)) writes: > I am still having trouble attempting to reference a global variable >during the course of an ORACLE SQL*FORMS trigger, (v. 5) [...stuff deleted...] You can't reference global variables in SELECT statements (at least under versions 2.0 and 2.3). You need to first copy the value in the global variable to a temporary, non-database field using the COPY command and then reference the temporary field in the SELECT statement. For example: PRE-FORM Trigger Step# 1 #COPY global.curr_nucleus :temp_field Step# 2 SELECT atom_numb, atom_name INTO poss_atoms.atom_numb, poss_atom.atom_name FROM atom_lookup WHERE atom_lookup.nucleus = :temp_field Michael Wang mouser@portia.stanford.edu