问题:写的SQL语句有点复杂,先把数据查出来写入临时表1,再建立临时表2,从临时表1查询出想要的数据再插入临时表2当中。查询结果为:该语句没有返回结果集。但是在SQL当中查询可以查出相应的数据。 临时表建立语句: CREATE TABLE [dbo].[#T临时表_收入]( [行号] [int] NOT NULL, [日期] [date] NULL, [日均收入] [nchar](10) NULL, [门诊平均人次] [nchar](10) NULL, [日均在院病人数] [nchar](10) NULL, [日均药占比] [nchar](10) NULL, [日均西成药比例] [nchar](10) NULL, CONSTRAINT [PK_T临时表_收入] PRIMARY KEY CLUSTERED ( [行号] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] |