Subject | AW: [firebird-support] How to handle this without a temp table... |
---|---|
Author | Steffen Heil |
Post date | 2005-02-01T19:53:54Z |
Hi
(
bigint tempid not null,
bigint id1 not null
)
Insert all you id1's into the table with the tempid.
Do your join with ... where tempid = ?.
Delete from MyTempReplacement where tempid = ?.
Regards,
Steffen
[Non-text portions of this message have been removed]
> Create Table MyTable1Create Table MyTempReplacement
> (
> bigint id1 not null, // this uses a generator for auto assignment
> // other stuff here
> )
>
> Create Table MyTable2
> (
> bigint id2 not null, // this uses a generator for auto assignment
> // other stuff here
> )
>
> Create Table MyJoin
> (
> bigint joinid not null, // PK
> bigint id1 not null, // FK
> bigint id2 not null, // FK
> // other stuff here
> )
(
bigint tempid not null,
bigint id1 not null
)
> What would be the 'recommended' way of doing this? SurelyGet a new tempid from a generator.
> this is not a unique problem, so someone else's success story
> would be helpful!
Insert all you id1's into the table with the tempid.
Do your join with ... where tempid = ?.
Delete from MyTempReplacement where tempid = ?.
Regards,
Steffen
[Non-text portions of this message have been removed]