Re: Use of ROWID to update a record?
Posted in 1997
Topics: General Discussion
Hi Nelson
If you want to use RECORD LIKE syntax, you will need another integer var
defined.
What you can do is the following :
define p_rec record like rec.*
define p_int integer
select rowid, *
into p_int, p_rec.*
from table
where . . . . .
p_int will now have the value of your rowid.
Hope this is what you wanted.
Just remeber that if you are using Online 7.2 upwards and you are using
framentation you will have to create a
table with rowids, otherwise you will run into serious trouble.
Cheers
Pierre Bosman
Nelson Fredsell wrote:
> I'd like to update the primary key in a table. The key is assigned
> by the user (not many records in this table). One option I've
> considered is using ROWID, but apparently this attribute is
> not passed into a RECORD LIKE variable. My other thought is to
> pass the primary key to a variable before any changes are made,
> but haven't had luck executing. I'd rather not implement a SERIAL
> attribute for this small table.
>
> Employee table:
> namecode (primary key, unique)
> TEQ
> NHF
> JAH