home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / informix / 3057 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  2.1 KB

  1. Path: sparky!uunet!destroyer!gatech!emory!emory!not-for-mail
  2. From: alan@effluvia.den.mmc.com (Alan Popiel)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re:  Help with Insert (ESQL/C)
  5. Date: 26 Jan 1993 11:13:06 -0500
  6. Organization: Mailing List Gateway
  7. Lines: 42
  8. Sender: walt@mathcs.emory.edu
  9. Distribution: world
  10. Message-ID: <1k3nuiINN6qg@emory.mathcs.emory.edu>
  11. Reply-To: alan@effluvia.den.mmc.com (Alan Popiel)
  12. NNTP-Posting-Host: emory.mathcs.emory.edu
  13. X-Informix-List-ID: <list.1821>
  14.  
  15. ->From: dpotlur@hubcap.clemson.edu (Potluri Dora)
  16. ->Subject: Help with Insert (ESQL/C)
  17. ->Date: Tue, 26 Jan 1993 05:23:10 GMT
  18. ->Reply-To: dpotlur@hubcap.clemson.edu (Potluri Dora)
  19. ->Organization: Clemson University
  20. ->
  21. ->Howdy!
  22. ->    I have a scienario where I need to insert into one table
  23. ->and one of the columns of the table is of serial datatype. After
  24. ->inserting into this table, I need to know what the column value
  25. ->is ( the serial type one) and insert this value into another 
  26. ->table where it is a foreign key.
  27. ->    I got the stuff working by inserting the row and then quering
  28. ->using the select statement. USing this value I insert into the next 
  29. ->table. 
  30. ->    Due to voluminous data we have, and to improve the performance
  31. ->I was thinking of eliminating the second query. Is there any other way
  32. ->that I could accomplish the same thing?( ie with out quering using the
  33. ->select statement?) .
  34. ->    I would appreicate if you can either mail me or post it on the
  35. ->news group.
  36. ->
  37. ->Thanx
  38. ->Potluri Dora
  39. ->Information Systems Lab  
  40. ->Clemson University
  41. ->Clemson, sc 29631
  42.  
  43. The value you want is in global variable 'sqlca.sqlerrd[2]'.
  44.  
  45. In my ESQL/C manual, it's on pages 2-18 ff.  For my 4GL colleagues, it's on 
  46. pages 3-77 ff of I4GL Ref. Manual Volume 1.
  47.  
  48. Regards,
  49. Alan
  50. +------------------------------+---------------------------------------+
  51. | R. Alan Popiel               | Internet: alan@den.mmc.com            |
  52. | Martin Marietta, LSC         | ( Please note: My opinions do not   ) |
  53. | P.O. Box 179, M/S 5422       | ( represent official Martin policy. ) |
  54. | Denver, Colorado 80201-0179  | Voice: 303-977-9998                   |
  55. +------------------------------+---------------------------------------+
  56.  
  57.