donnie91910
asked on
insert values using Select
I am trying to get a value to insert into a table from a table and get the following error:
Subqueries are not allowed in this context. Only scalar expressions are allowed.
Here is the query.
Insert into [dbo].[tblRpt_Param]
(ReportName,
Previous_Run_Date,
Current_Run_Date)
Values ('AXA_Approved_Accts',Null ,(Select Max(CrtDate)From [transaction].dbo.narrstat ushistory) )
Subqueries are not allowed in this context. Only scalar expressions are allowed.
Here is the query.
Insert into [dbo].[tblRpt_Param]
(ReportName,
Previous_Run_Date,
Current_Run_Date)
Values ('AXA_Approved_Accts',Null
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER