On 27/05/2009 9:47 PM, Igor Tandetnik wrote: > "Vasil Boshnyakov" <vas...@voicecom.bg> > wrote in message news:000c01c9de8b$16510a40$42f31e...@bg >> The short description is: we need to copy many records of a table in >> the same table but changing the "Name" value. So we have added a new >> function which process the names: >> >> Insert into users ItemID, Name >> Select ItemID, newName(Name) from users where itemActive = 1; >> >> That works great but we need one more step: how to much the pairs >> "item comes from the Select <-> new item result of the Insert". We >> need to track the copy history: itemID -> newItemID. > > What is this newItemID you speak of? As far as I can tell from your > (syntactically invalid) statement, new records are inserted with the > same ItemId as the old ones.
Vasil, please tell us the schema, otherwise we can't help you. Some explanation of what you are really trying to do might also aid us. There are other concerns beside Igor's, like "itemActive" would seem from its name to belong to an "items" table, not to a "users" table. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users