Re: Getting a serial index back
Posted in 1995
Topics: General Discussion
}>>>>>>>>> Perry's response to Pat O'Connor <<<<<<<<<< Why not just look at the sqlca.sqlerrd[2]. It contains the newly assigned serial number after an insert. This is _way_ cheaper than reselecting. } From: "Pat O'Connor" <poconnor@internetmci.com> } Subject: Re: Getting a serial index back } Date: 3 Nov 1995 19:28:35 GMT } To: informix-list@rmy.emory.edu } } Jeff Pickett <pickett@telerama.lm.com> wrote: } > } > Ok, this has got to be an easy one for the majority of you. So } > here it is: } > } > I have a header record with a serial index on it, so after I } > insert the header record into table 1, I would like to know what } > that serial number is so I can put it in the detail record I } > am about to insert into table 2. } > } > So how do I find what serial number was just used? } > <snipped>> } Ok - this is probably a hack, but it is what I did when faced } with the same necessity. } I selected the *indexed column* from the table using the header's } unique keys following the insert and stored it for later use. } } } -perryd (Guru) ==================================================================== = Perry Dillard - Chief Architect = = FourGen Software, Inc. = = FourGen Building = = 115 NE 100th Street = = Seattle, W.A. 98125-8098 = = = = e-mail: perryd@fourgen.com Web Site http://www.fourgen.com = ====================================================================