Here are my 2 SQL tables:
- tblElevators
ElevatorID (int, pk);
Location (nvarchar);
Manufacturer (nvarchar);
This table have nearly 7000 records, and Manufacturer field contains values from lookup table below (some values are Null)
- tblManufacturers
Manufacturer (nvarchar, pk);
Now I want to insert a ID column in second table (tblManufacturers) which will be Integer and PrimaryKey. Since it have only 40 rows, I’ll put PK manually (1,2,3…40)
My question is – how I can change all existing Manufacturer values in tblElevators to new Integer value, withot manually going thru all the data and figuring out what “Manufacturer Name” now is ManufacturerID.
Thank you
I am not really sure what you want. But it sound like you want something like this: