Re: [GENERAL] Duplicating rows in one table but with one column value

2006-09-01 Thread Anastasios Hatzis
Anastasios Hatzis wrote: rows = plpy.execute("""SELECT "FooHolding" WHERE "CoosOfFoo_vid" = ORIGINALVALUE;""") for row in rows: for col in row: plpy.execute("""INSERT INTO "FooHolding" ("CoosOfFoo_eid", "CoosOfFoo_vid", "FoosOfCoo_eid", "FoosOfCoo_vid") VALUES (col[0], COPYVALUE, c

[GENERAL] Duplicating rows in one table but with one column value different

2006-09-01 Thread Anastasios Hatzis
Hi folks, I have multiple tables where some of the rows need sometimes to be duplicated, but where the copy record has in one column a different value. I have an idea how I could realize this via functions, but probably you have another suggestion? Example table: CREATE TABLE "FooHolding" (