home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / database / informix / 1892 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.6 KB

  1. Path: sparky!uunet!gatech!emory!emory.mathcs.emory.edu
  2. From: widener!das13!dave.snyder@emory.mathcs.emory.edu (Dave Snyder)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re: HELP! Trying to UPDATE temp table HELP!
  5. Message-ID: <9488@emory.mathcs.emory.edu>
  6. Date: 8 Sep 92 13:48:03 GMT
  7. Sender: walt@mathcs.emory.edu
  8. Reply-To: widener!das13!dave.snyder@emory.mathcs.emory.edu (Dave Snyder)
  9. Lines: 29
  10. X-Informix-List-ID: <list.1432>
  11.  
  12. Quoting Mark L Trotter...
  13. }    I am trying to create a temporary table, insert some elements from
  14. } another table, then go thru the temporary table using a cursor and 
  15. } do some updating of other elements.  All works except:
  16. }    1. I can't DEFINE a memory record LIKE the temporary table because
  17. }       it doesn't exist at compile time so I assume I must define the
  18. }       entire memory record via listing all of the elements, but if I do
  19. }       that then: 
  20. }    2. I can't UPDATE the temporary table using 
  21. }        UPDATE temptablename SET temptablename.* = memrecord.*
  22. }       because I get a compile error saying that memrecord was not
  23. }       defined using the RECORD LIKE phrase.
  24. } Is this a know bug and is there any workarounds?
  25. Try this:
  26.  
  27. DEFINE the record the "long hand" way and then use an UPDATE statement like
  28. this one...
  29.  
  30. UPDATE temptablename SET (temptablename.col1, temptablename.col2, etc...)
  31.                = (memrecord.col1, memrecord.col2, etc...)
  32.  
  33. DAS
  34. -- 
  35. David A. Snyder @ Snide Inc. - Folcroft, PA                    Current Release
  36.                                                                is db4glgen-3.7
  37. UUCP:  ..!uunet!das13!dave   INTERNET:  dave.snyder@snide.com
  38.