Code:
[COLOR=#242729][FONT=Arial]"insert into temp_cost(RecordID,ClassID, Classtype, ClassName, TypeOrder, CreateDate)[/FONT][/COLOR][COLOR=#242729][FONT=Arial] values('" & strRecordID &[/FONT][/COLOR]"','"& strClassID &"','"[COLOR=#242729][FONT=Arial]& strClassType & "', '" & strClassName & "', '" & strTypeorder & "', '" & strCreateDate & "')"[/FONT][/COLOR]
This code works, but I am trying to add a subquery to auto populate ClassID.
Code:
[COLOR=#242729][FONT=Arial]"insert into temp_cost(RecordID,ClassID, Classtype, ClassName, TypeOrder, CreateDate) select ('" & strRecordID & "', select classid from employee where classcode=&strClassType& , '" & strClassType & "', '" & strClassName & "', '" & strTypeorder & "', '" & strCreateDate & "')"[/FONT][/COLOR]
This is what I've tried and it's not looking up classid from the employee table. How can I make this work?