INSERT INTO [dbo].[dm_pmp_scores]
([fosid],[fycode],[empid],[fullname],[jobgrade],[meritrate],[perfrate],
[potband],[hrres],[isdirty],criticality,promotability,PostRanking,iscommited)
select '75DA940A-5436-4866-8D44-FE1890E2C0F6','FY0607','tt0042',
(select distinct fullname,jobGrade from [vw_pat_users] where EmployeeID='tt0042'),'A','B','Band 2','','0','','','',0
报错
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS
([fosid],[fycode],[empid],[fullname],[jobgrade],[meritrate],[perfrate],
[potband],[hrres],[isdirty],criticality,promotability,PostRanking,iscommited)
select '75DA940A-5436-4866-8D44-FE1890E2C0F6','FY0607','tt0042',
(select distinct fullname,jobGrade from [vw_pat_users] where EmployeeID='tt0042'),'A','B','Band 2','','0','','','',0
报错
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS
([fosid],[fycode],[empid],[fullname],[jobgrade],[meritrate],[perfrate],
[potband],[hrres],[isdirty],criticality,promotability,PostRanking,iscommited)
select distinct '75DA940A-5436-4866-8D44-FE1890E2C0F6','FY0607','tt0042', fullname,jobGrade ,'A','B','Band 2','','0','','','',0
from [vw_pat_users] where EmployeeID='tt0042'
当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式。