文章分类 - Sql Server
摘要:附加数据库时报错误:Microsoft SQL Server,错误: 5120原因:由于操作权限不够解决办法:对于要附加的数据库文件添加everyone的权限,然后在重新附加数据库文件即可
阅读全文
摘要:ALTERProcedure[dbo].[P_Score]@PIDvarchar(10)asDeclare@condvarchar(1000),@sqlvarchar(5000)select@cond=(selectCONTENTfromV_Temp_DATAwhereDATA_ID=@PID)se...
阅读全文
摘要:CreatePROCEDURE[dbo].[Pro_ComplaintsCount]@StarDatevarchar(30),@EndDatevarchar(30)ASBegin --Declare@ComplaintTypeint--大类ID Declare@Typevarchar(50)--大类...
阅读全文
摘要:ALTERProcedure[dbo].[p_psbz_tssl_rate]@yearintasdeclare@bhnumeric(18,2),@nsnumeric(18,2),@lfnumeric(18,2),@ytnumeric(18,2),@iint,@clltotalnumeric(18,2...
阅读全文
摘要:找了好久终于找到原因 是由于数据库里的数据格式有错误存在201308之类的数据 删除即可而我的字段p_join_time 是varchar(8)格式的datediff(day,CONVERT(varchar(100),T.p_join_date),CONVERT(varchar(100),T.p_official_date)) as 转正天数
阅读全文
摘要:此文章转载别人的,为了学习记录下,请谅解if object_id('s') is not null drop table s if object_id('c') is not null drop table c if object_id('t') is not null drop table t create table S(sno int,sname varchar(300)) create table c(cno int,cname varchar(300)) create table t(sno int,cno int,score int)
阅读全文

浙公网安备 33010602011771号