Hi all, I have a table shares that consists of company id, shareholder id, shareholder name. Company id and shareholder id are decimal digits; shareholder name is text. Due to some missings of my initial data, I'd like to create a unique id for the shareholder ids which are blank/null in the imported version and are the same for every shareholder that appears into couple of companies. So far I've got to: create table shares (company id not null, shareholder id not null, shareholder name not null) PRIMARY KEY ( shareholder name)
Then I'd like to update the missing shareholder id with autoincrement and group them by shareholder name, but I'm not sure how to do it. I'm thinking of something like update autoincrement id where id is null group by shareholder name. Any straws/pointers are welcome. Thanks in advance. -- Димитър Василев Dimitar Vassilev GnuPG key ID: 0x4B8DB525 Keyserver: pgp.mit.edu Key fingerprint: D88A 3B92 DED5 917E 341E D62F 8C51 5FC4 4B8D B525