Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Dimitar Vasilev (dimitar.vassilevgmail.com)
Date: Wed Sep 19 2007 - 04:53:26 CDT
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
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.
GnuPG key ID: 0x4B8DB525
Key fingerprint: D88A 3B92 DED5 917E 341E D62F 8C51 5FC4 4B8D B525