Insert multiple records, selected from some columnHi
I want to Insert Company code = XYZ for all the employees whose CompanyKod='ABC'
For ex: If there are 10 employees with companyKod = 'ABC', then for all those 10 employees I have to insert 10 more rows with companyKod='XYZ'
So , totally there should be 20 records after Insert.
I tried with below Query,
Insert into table1(EmpID, CompanyKod)
values ((select EmpID from HandlaggareBolagKoppling where CompanyKod='ABC'),'XYZ')
but as subquery returns more than 1 value, so insert is failing.
Please help me to correct this Query.