How to get values from SELECT stmt into local variables?
mkerrigan_at_ktoys.com
Date: 02/04/05
- Next message: Dean: "Re: How to get values from SELECT stmt into local variables?"
- Previous message: Alejandro Mesa: "RE: Login fails when trying to load a txt file to a table"
- Next in thread: Dean: "Re: How to get values from SELECT stmt into local variables?"
- Reply: Dean: "Re: How to get values from SELECT stmt into local variables?"
- Reply: Alejandro Mesa: "RE: How to get values from SELECT stmt into local variables?"
- Messages sorted by: [ date ] [ thread ]
Date: 4 Feb 2005 12:18:55 -0800
I have a table which is used for history. It has several fields, any
one of which would be "updated", but in this case, a new record is
inserted instead with a new value and effective date. The old values
in the previous record need to be inserted into the new record as well.
I am using a SELECT statement to get the values of the last record, to
insert into the new record along with the new values. I would like to
do something similar to the FETCH INTO command used by a cursor, which
would then populate the variables with the results of the SELECT
statement.
As far as I know, the only options I have are to fetch each value
separately with separate SELECT statements, or to make a cursor that
would only be used to retrieve one record.
Is there any other way to do this? Thanks!
- Next message: Dean: "Re: How to get values from SELECT stmt into local variables?"
- Previous message: Alejandro Mesa: "RE: Login fails when trying to load a txt file to a table"
- Next in thread: Dean: "Re: How to get values from SELECT stmt into local variables?"
- Reply: Dean: "Re: How to get values from SELECT stmt into local variables?"
- Reply: Alejandro Mesa: "RE: How to get values from SELECT stmt into local variables?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|