home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / informix / 2926 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.7 KB

  1. Path: sparky!uunet!gossip.pyramid.com!pyramid!infmx!cortesi
  2. From: cortesi@informix.com (David Cortesi)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re: Updating within a scrolling cursor
  5. Message-ID: <1993Jan11.200253.8580@informix.com>
  6. Date: 11 Jan 93 20:02:53 GMT
  7. References: <1ik9fsINNhbe@emory.mathcs.emory.edu>
  8. Sender: news@informix.com (Usenet News)
  9. Organization: Informix Software, Inc.
  10. Lines: 35
  11.  
  12. >Quoting Reg Foulkes...
  13. > I would like to access the temporary file created by the a scrolling 
  14. > cursor. Anyone know how to do this (i.e. what is the mystery table name)? 
  15. >  
  16. >  Here is what I would like to do
  17. >   Declare scrolling cursor sel_stmt 
  18. >   Open sel_stmt
  19. >   RUN "insert into mystery_table VAULES (....) | isql database - -"
  20. >                    ^^^^^^^^^^^^^
  21. >   FETCH next sel_stmt
  22.  
  23. >Quoting Dave Snyder...
  24. >
  25. >Won't happen.  First of all, I don't think you can access a cursor's tmp
  26. >table...
  27.  
  28. well, he COULD if he knew its name, but you're right because the
  29. name formation rule isn't documented. So even if you figure out
  30. what the name is for any case, you can't rely on it.
  31.  
  32. >  Second, even if you were using a real tmp table, when you execute
  33. >the RUN command to do the INSERT, a new database process is started.  The
  34. >tmp table from your first database process is not available to any other
  35. >database processes.
  36.  
  37. Very true. But the basic question -- can I open a cursor and then
  38. use INSERT to stick more rows in the selection set? -- is interesting.
  39. Answer: you probably could if you knew the table name, but you don't,
  40. and won't.
  41.  
  42. For Reg Foulkes: why do you want to do this?  Perhaps if you explain
  43. what you are trying to accomplish, somebody would have another
  44. suggestion.
  45.