子查询在insert语句中返回了多个值

时间:2013-04-10 04:42:33

标签: sql-server-2008

我需要解决方案来修复此错误Subquery返回的值超过1。当子查询遵循=,!=,<,< =,>,> =或子查询用作表达式时,不允许这样做。 我的插入语句中没有子查询,但我仍然收到此错误。

代码:

INSERT INTO enquiries_dtls(confdate,confname,region,enquiry,attendedby,dctname,
                           hospital,contactno,email,addr)
VALUES('10/04/2013',
       'APAO',
       'Delhi',
       'test',
       'test',
       'test',
       'test',
       '123214',
       'abc@abc.com',
       'test')

DDL:

CREATE TABLE [dbo].[enquiries_dtls]
(
  [sno] [int] IDENTITY(1,1) NOT NULL, 
  [Timestamp] [timestamp] NULL,
  [confdate] [date] NULL,
  [confname] [varchar](max) NULL, 
  [region] [varchar](50) NULL,
  [enquiry] [varchar](max) NULL,
  [attendedby] [varchar](50) NULL,
  [dctname] [varchar](50) NULL,
  [hospital] [varchar](50) NULL,
  [contactno] [int] NULL,
  [email] [varchar](50) NULL,
  [addr] [varchar](max) NULL,
  [stsupdate] [varchar](max) NULL,
  [dtupdate] [date] NULL, 
  [closingdate] [date] NULL,
  [clsedby] [varchar](50) NULL,
  [revenue] [varchar](50) NULL,
  [apprstatus] [varchar](50) NULL,
  [clsed] [varchar](50) NULL,
  [enqId] [varchar](50) NULL
);

0 个答案:

没有答案