Subject | [firebird-support] problem with update clause |
---|---|
Author | mat |
Post date | 2005-09-06T12:07:13Z |
Hi all.
What's the easiest way to do an update in following case.
I've got 2 tables: Goods(Id,Name...) and Orders (ID,GoodsId...)
In table Goods i've got duplicated records. And some of these duplicated
records were used to generete some new Orders. I can't remove this
duplicated values now because I dont want to loose information about
Goods in this table. I created view which show me OldGoodId(the correct
one), Name and NewGoodId (this duplicated).
So what's the easiest way to replace this rows in column GoodsId in
table Orders, which reference to NewGoodId with a OldGoodId?
thanks for any help
mat
What's the easiest way to do an update in following case.
I've got 2 tables: Goods(Id,Name...) and Orders (ID,GoodsId...)
In table Goods i've got duplicated records. And some of these duplicated
records were used to generete some new Orders. I can't remove this
duplicated values now because I dont want to loose information about
Goods in this table. I created view which show me OldGoodId(the correct
one), Name and NewGoodId (this duplicated).
So what's the easiest way to replace this rows in column GoodsId in
table Orders, which reference to NewGoodId with a OldGoodId?
thanks for any help
mat