Re: Updating within a scrolling cursor
Posted in 1993
Reg Foulkes writes: >In article <1ik9fsINNhbe@emory.mathcs.emory.edu>, dave.snyder@snide.com >(Dave Snyder) wrote: >> Won't happen. First of all, I don't think you can access a cursor's tmp >> table. Second, even if you were using a real tmp table, when you execute >> the RUN command to do the INSERT, a new database process is started. The >> tmp table from your first database process is not available to any other >> database processes. > > Sorry but you are mistaken. Currently, I can create my own tmp table and >it works fine. I just wanted to bypass that step and go directly to the >temp table created by the open and do an insert before a fetch. This I don't believe this will work in every release. I just tried it using 5.0 OnLine, and the temp table I created was not available outside the session of the process that created it. Quoting the 5.0 SQL Reference Guide: [pg 7-86] "Once a temporary table is created, you can build indexes on the table. However, you are the only user who can see the temporary table." This does not explicitly define "user" but empirically I have found this to equate to "sqlturbo" (or sqlexec) and not userid. >saves me from creating the temp table. That I use for the fetch. >Unfortunately, >informix hides its' system temp tables so I am unable to use them. Why? Because we reserve the right to change how we implement something like scroll cursors. If access were given to these (currently) temp tables, we would be obligated to always implement them in that fashion. A real example of this is ORDER BYs: they were once implemented using temp tables with an index on them (X.10.03), but are now done using a quicksort variant with temp files (but not temp tables). Dave -- Disclaimer: These opinions are not those of Informix Software, Inc. ************************************************************************** "I look back with some satisfaction on what an idiot I was when I was 25, but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney