I have 3 tables master, element, check.
master
master_id,
master_name,
element
element_id,
element_name,
check
(master_id)
(element_id)
check_id
check_name
description
I want to insert values into check table such as check_id,check_name,description with master_id from master table and element_id from element table.
I tried the following query.
insert
into CHECK values((select e.ELEMENT_ID,m.MASTER_ID from MASTER as m,ELEMENT as e where m.MASTER_ID=3 and ELEMENT_ID=3),'M001','chkitem1','Check description',)
It throws me the following error.
Msg 116, Level 16, State 1, Line 1
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.Msg 213, Level 16, State 1, Line 1
Column name or number of supplied values does not match table definition.
can anyone give an idea for this..?