Richard Huxton <[EMAIL PROTECTED]> writes:
> In your example, I would expect the nextval() to be called during the
> "fetch", before the ordering. You could probably do something like:
> INSERT INTO pending_tnmt_sec
> SELECT foo.*, nextval('sec_seq') FROM
>(
> SELECT tseceventid, ...
>
Mike Nolan wrote:
I have the following insert to populate a new table:
insert into pending_tnmt_sec
select tseceventid, tsecsecno,
nextval('sec_seq'),
tsecrtddt
from tnmtsec
order by tsecrtddt,tseceventid,tsecsecno;
I need to access this data in a particular order which may change over
time but the
Try:
insert into pending_tnmt_sec
select tseceventid, tsecsecno,
nextval('sec_seq'),
tsecrtddt
from (
select tseceventid, tsecsecno, tsecrtddt
from tnmtsec
order by tsecrtddt,tseceventid,tsecsecno) as ss;
Mike Nolan wrote:
I have the following insert to populate a new table:
insert into pend
I have the following insert to populate a new table:
insert into pending_tnmt_sec
select tseceventid, tsecsecno,
nextval('sec_seq'),
tsecrtddt
from tnmtsec
order by tsecrtddt,tseceventid,tsecsecno;
I need to access this data in a particular order which may change over
time but the initial order I