Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic SQL using INSERT with a predefined query and an id.
On 27 Jun 2001 12:33:29 -0700, crappygolucky_at_hotmail.com (crappy) wrote:
>if i understand your problem, i have an awful hack for you.
>
>use the sequence, but subtract rownum from it (and add 1). i.e., your
>Query in the List table looks like
>
>"select myseq.nextval + 1 - rownum, ..."
>
>like i said, it's a hack, but for each "population" that first column
>should be the same number. another drawback is, the sequence will
>still iterate of course, and you will have big gaps in the id's.
>
Scary, but strangely enticing. I would not want to use this. Both, because of the hack, and the outside reference to the sequence from a query.
Brian Received on Wed Jun 27 2001 - 15:08:40 CDT