sql - Selecting from one table and modifying it before importing -


i have since modified process , simplified. in past, had 2 tables, tablename , result. tablename had column (56th of 90) named cnty char(3). second table, result, had field 000 + cnty. field titled area. trying insert cnty values tablename, add 3 zeros @ beginning , place them in result table under column, area.

now have both columns in result. area blank now. cnty contains values in tablename (79954 of them).

sample data

 area     employment      busdesc      cnty                410      gas station    003 

desired result

  area     employment      busdesc      cnty  000003        410       gas station     003 

try following query:

update dbo.result              set area = concat('000',cnty); 

hope helps!


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -