SQL自动提示失效,且报错诡异(找不到任何理由)

不穿内裤的超人 2017-04-30 05:54:26
今天写语句的时候,突然就发现以前会自动提示表名和字段名,今天居然不会提示了,而且报错如下图:

但是诡异的是,如果第一句不是写创建临时表,写的是查询语句就会正常提示,但是只要这句创建一开始后面都不提示

图二更诡异的是,我把创建语句分两行,然后提示where附近有语法错误。

首先我考虑了是不是提示功能被关了,但是并没有。
其次不管是远程连接服务器,还是我直接跑到服务器上连接,这段语句就是这么诡异。
第三,我把语句复制到新建查询窗口,依旧没有任何变化。
第四,语句是可以正常执行,并不会报错,结果也没有任何错误,但就是没提示,书写困难。
第五,我甚至重启了电脑也无济于事。

大家有没有什么好的办法来解救一下?
...全文
241 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
kingtiy 2017-05-02
  • 打赏
  • 举报
回复
语法没问题,应该智能感知的问题.可以把这个关闭了. 或者你把客户端关闭重新打开试下
二月十六 2017-05-01
  • 打赏
  • 举报
回复
引用 3 楼 qq_18219519 的回复:
[quote=引用 2 楼 sinat_28984567 的回复:] 把有问题的语句贴上来,让大家执行一下看看行不
create table #mzrz(out_seq int,pat_name varchar(50),lord_tells varchar(250),now_history varchar(550),cbzd varchar(150),clyj varchar(150),cwzt varchar(150),doctor varchar(20)) create table #seq_all(out_seq int,qt_seq int)--用于保存所有缴费序号 insert into #mzrz(out_seq,pat_name,lord_tells,now_history,cbzd,clyj,cwzt,doctor) select out_seq,pat_name,lord_tells,now_history,cbzd,clyj,'',doctor FROM v_out_case_mzrz where dgn_date is not null and dgn_date between @start and @end and dgn_doctor=@dgn_doctor update #mzrz set cwzt=cwzt+'主诉未写;' from #mzrz where lord_tells is null or lord_tells='' update #mzrz set cwzt=cwzt+'现病史未写;' from #mzrz where now_history is null or now_history='' update #mzrz set cwzt=cwzt+'初步诊断未写;' from #mzrz where cbzd is null or cbzd='' update #mzrz set cwzt=cwzt+'处理计划未写。' from #mzrz where clyj is null or clyj='' insert into #sum_price(out_seq,sm) select c.out_seq,SUM(b.amount*b.price) from outrecipehead a,outrecipedetail b,#seq_all c where a.rec_no=b.rec_no and a.out_seq=b.out_seq and a.chg_date is not null and (a.out_seq=c.qt_seq or a.out_seq=c.out_seq) --考虑了主号可能直接收费的情况,虽然这种情况并不能书写病历 group by c.out_seq select out_seq,pat_name,cwzt from #mzrz drop table #mzrz drop table #seq_all[/quote] 这几句试着没问题。。
  • 打赏
  • 举报
回复
没看出来问题。。。。。
  • 打赏
  • 举报
回复
引用 2 楼 sinat_28984567 的回复:
把有问题的语句贴上来,让大家执行一下看看行不
create table #mzrz(out_seq int,pat_name varchar(50),lord_tells varchar(250),now_history varchar(550),cbzd varchar(150),clyj varchar(150),cwzt varchar(150),doctor varchar(20)) create table #seq_all(out_seq int,qt_seq int)--用于保存所有缴费序号 insert into #mzrz(out_seq,pat_name,lord_tells,now_history,cbzd,clyj,cwzt,doctor) select out_seq,pat_name,lord_tells,now_history,cbzd,clyj,'',doctor FROM v_out_case_mzrz where dgn_date is not null and dgn_date between @start and @end and dgn_doctor=@dgn_doctor update #mzrz set cwzt=cwzt+'主诉未写;' from #mzrz where lord_tells is null or lord_tells='' update #mzrz set cwzt=cwzt+'现病史未写;' from #mzrz where now_history is null or now_history='' update #mzrz set cwzt=cwzt+'初步诊断未写;' from #mzrz where cbzd is null or cbzd='' update #mzrz set cwzt=cwzt+'处理计划未写。' from #mzrz where clyj is null or clyj='' insert into #sum_price(out_seq,sm) select c.out_seq,SUM(b.amount*b.price) from outrecipehead a,outrecipedetail b,#seq_all c where a.rec_no=b.rec_no and a.out_seq=b.out_seq and a.chg_date is not null and (a.out_seq=c.qt_seq or a.out_seq=c.out_seq) --考虑了主号可能直接收费的情况,虽然这种情况并不能书写病历 group by c.out_seq select out_seq,pat_name,cwzt from #mzrz drop table #mzrz drop table #seq_all
二月十六 2017-04-30
  • 打赏
  • 举报
回复
把有问题的语句贴上来,让大家执行一下看看行不
五维思考 2017-04-30
  • 打赏
  • 举报
回复
实在找不到解决办法,就重装数据库吧

22,210

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧