Re: Help with Insert (ESQL/C)
Posted in 1993
->From: dpotlur@hubcap.clemson.edu (Potluri Dora) ->Subject: Help with Insert (ESQL/C) ->Date: Tue, 26 Jan 1993 05:23:10 GMT ->Reply-To: dpotlur@hubcap.clemson.edu (Potluri Dora) ->Organization: Clemson University -> ->Howdy! -> I have a scienario where I need to insert into one table ->and one of the columns of the table is of serial datatype. After ->inserting into this table, I need to know what the column value ->is ( the serial type one) and insert this value into another ->table where it is a foreign key. -> I got the stuff working by inserting the row and then quering ->using the select statement. USing this value I insert into the next ->table. -> Due to voluminous data we have, and to improve the performance ->I was thinking of eliminating the second query. Is there any other way ->that I could accomplish the same thing?( ie with out quering using the ->select statement?) . -> I would appreicate if you can either mail me or post it on the ->news group. -> ->Thanx ->Potluri Dora ->Information Systems Lab ->Clemson University ->Clemson, sc 29631 The value you want is in global variable 'sqlca.sqlerrd[2]'. In my ESQL/C manual, it's on pages 2-18 ff. For my 4GL colleagues, it's on pages 3-77 ff of I4GL Ref. Manual Volume 1. Regards, Alan +------------------------------+---------------------------------------+ | R. Alan Popiel | Internet: alan@den.mmc.com | | Martin Marietta, LSC | ( Please note: My opinions do not ) | | P.O. Box 179, M/S 5422 | ( represent official Martin policy. ) | | Denver, Colorado 80201-0179 | Voice: 303-977-9998 | +------------------------------+---------------------------------------+