Path: utzoo!attcan!uunet!ns-mx!vaxa.weeg.uiowa.edu!broy From: broy@vaxa.weeg.uiowa.edu (Barbara Roy) Newsgroups: comp.databases Subject: Re: SQL Question record by record processing Message-ID: <2917@ns-mx.uiowa.edu> Date: 26 Oct 90 13:32:10 GMT References: <1731@exodus.Eng.Sun.COM> Sender: news@ns-mx.uiowa.edu Reply-To: broy@vaxa.weeg.uiowa.edu Organization: U of I - Weeg Computing Center Lines: 22 News-Software: VAX/VMS VNEWS 1.3-4 In article <1731@exodus.Eng.Sun.COM>, bm@bike2work.Eng.Sun.COM (Bill Michel) writes... >I want to be able to process each record in one of my tables, one by one. >Something similar, say, in a shell script, to setting a variable to the >contents of a directory, and then using *shift* to process each file >one by one. > >Thanks in advance for any pointers you can give. > >Bill >-- >Bill Michel >bm@eng.sun.com These views are my own, not Sun's. You neglected to state what SQL package you are using. If you were using ORACLE V6, PL/SQL cursors would do the trick for you. PL/SQL allows cursors to fetch one record at a time and process then with loop statements and conditional branching. Barbara Roy, Weeg Computing Center, University of Iowa, Iowa City, IA. 52242 Phone: 319-335-5506 Internet: broy@vaxa.weeg.uiowa.edu Bitnet: broyva@uiamvs Disclaimer: My opinions are solely my own and may change daily.