insert multiple rows using subquery
database, sql, sql-server
Solution
INSERT INTO qualification_lookup (variation, correct_qualification)
select Qualification,'A-Level' from student where Qualification like 'A%'
Problem
This is the query: ``` INSERT INTO qualification_lookup (variation, correct_qualification) SELECT (SELECT Qualification FROM student WHERE Qualification like 'A%') ,'A-Level' ``` This is the error I get if I try to execute the query. Msg 512, Level 16, State 1, Line 1 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. The statement has been terminated. I am new to SQL so kindly if someone tells me any alternative to do that.