Subject | Re: [firebird-support] Insert from query, but changing one field? |
---|---|
Author | Joe Martinez |
Post date | 2003-10-22T07:40:03Z |
>At 11:08 PM 21/10/2003 -0700, you wrote:Ah. Very good point. It looks like what you suggested above would be the
>
> > >Assuming you have a generator + trigger supplying the PK value, col1:
> > >
> > >insert into enrollments (col2, col3, ...., classid, ....)
> > >select col2, col3, ...., 456, ....
> > >from enrollments
> > >where classid <> 456
> >
> >No, I don't have a generator/trigger generating the PK.
>
>You must be getting it from somewhere...if it's a composite of something,
>then you aren't going to get unique keys by dup'ing rows back into the same
>table, are you?
right solution, but I had completely forgotten about the PK. Oh
well. Looks like I'll have to do this in code instead of a SQL statement.
Thanks,
Joe