insert into 问题,请高手帮助下菜鸟
insert into FlyPM_PrjPlan_Task (PT_ID, PP_ID, Wbs_ID, PT_DepartID, PT_Status, PT_EntrustDate,
PT_PlanEnd, PT_ControlRemark, PT_Remark, PT_Editor, PT_EditTime, PT_IsNewAdd, PT_IsDelete,
PT_AddDelTime) values('2014030500002','20140305002','1408',(SELECT sDeptID, sWbsStatus,
dEntrustDate, dPlanEndDate, sControlRemark, sRemark, sCreater, dCreateTime
FROM FlyPM_WbsItem where Wbs_ID = '1408'),'1','0',(select GETDATE()))
------解决方案-------------------- INSERT INTO FlyPM_PrjPlan_Task
(PT_ID, PP_ID, Wbs_ID, PT_DepartID, PT_Status, PT_EntrustDate,
PT_PlanEnd, PT_ControlRemark, PT_Remark, PT_Editor, PT_EditTime,
PT_IsNewAdd, PT_IsDelete, PT_AddDelTime)
SELECT
'2014030500002', '20140305002', '1408', sDeptID, sWbsStatus,
dEntrustDate, dPlanEndDate, sControlRemark, sRemark, sCreater,
dCreateTime, '1', '0', GETDATE()
FROM
FlyPM_WbsItem
WHERE
Wbs_ID='1408'
------解决方案--------------------菜鸟解决问题菜,提问题还是菜:
insert into FlyPM_PrjPlan_Task
(PT_ID, PP_ID, Wbs_ID, PT_DepartID, PT_Status,
PT_EntrustDate,PT_PlanEnd, PT_ControlRemark, PT_Remark, PT_Editor,
PT_EditTime, PT_IsNewAdd, PT_IsDelete, PT_AddDelTime)
SELECT '2014030500002','20140305002','1408',sDeptID, sWbsStatus,
dEntrustDate, dPlanEndDate, sControlRemark, sRemark, sCreater,
dCreateTime,'1','0',GETDATE()
FROM FlyPM_WbsItem where Wbs_ID = '1408'
------解决方案--------------------getdate()不用select
------解决方案--------------------