Insert Select data from another table

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
ahosny1
User
Posts: 12

Insert Select data from another table

Post by ahosny1 »

Please help identifying the error resulting : Incorrect syntax near the keyword 'SELECT'. Incorrect syntax near ')'.

Code in my Page_Render server event:

string sInsertSql = "INSERT INTO Monthly (PeriodID,EmployeeID,Salary) Values (99,99,"+" SELECT Salary FROM Employees WHERE EmployeeID = 2 "+" ) ";
ew_Execute(sInsertSql);


ahosny1
User
Posts: 12

Post by ahosny1 »

it was a missing () around the select statement


Post Reply