Re: HELP! Trying to UPDATE temp table HELP!
Posted in 1992
Quoting Mark L Trotter...
}
} I am trying to create a temporary table, insert some elements from
} another table, then go thru the temporary table using a cursor and
} do some updating of other elements. All works except:
} 1. I can't DEFINE a memory record LIKE the temporary table because
} it doesn't exist at compile time so I assume I must define the
} entire memory record via listing all of the elements, but if I do
} that then:
} 2. I can't UPDATE the temporary table using
} UPDATE temptablename SET temptablename.* = memrecord.*
} because I get a compile error saying that memrecord was not
} defined using the RECORD LIKE phrase.
}
} Is this a know bug and is there any workarounds?
}
Try this:
DEFINE the record the "long hand" way and then use an UPDATE statement like
this one...
UPDATE temptablename SET (temptablename.col1, temptablename.col2, etc...)
= (memrecord.col1, memrecord.col2, etc...)
DAS
--
David A. Snyder @ Snide Inc. - Folcroft, PA Current Release
is db4glgen-3.7
UUCP: ..!uunet!das13!dave INTERNET: dave.snyder@snide.com