SQL insert from one table to another
Posted on 2014-08-18
Need help with structure of an SQL insert. I will try to make the scenario clear....
I have a Customer table with a column called Country, which is an oid field, I have another column called OldCountry, which in an NVarChar. I have a seperate table called Country which contains an oid field and the name of the country. I need to loop through OldCountry looking for a 'string' match against the country table, if a match is found then return the oid from the country table and insert it into the Country oid column in Customer.
Hope thats relatively clear