账号通
    

账号  

密码  

1902

查看

4

回复
主题:[求助]SQL语句的问题求助官方 [收藏主题] 转到:  
ini111 当前离线

266

主题

0

广播

0

粉丝
添加关注
级别:二年级

用户积分:1325 分
登录次数:217 次
注册时间:2008/12/2
最后登录:2020/2/7
ini111 发表于:2012/3/9 11:29:13   | 只看该作者 查看该作者主题 楼主 
科汛在线考试系统(NET)

数据库一直占CPU100%,换成SQL的也不行。

检测到以下SQL有问题,但我找自定义SQL没有找到,请帮助。



1、

Select ID,Title,Tid,ReadPoint,InfoPurview,Fname,Changes,AddDate,Popular,ChannelID,hits,username From (select ID,Title,Tid,ReadPoint,InfoPurview,Fname,Changes,AddDate,Popular,1 as ChannelID,hits,Inputer As username From KS_Article Where DelTF=0 And Verific=1 And keywords like ''%儿科学%'' Union All select ID,Title,Tid,ReadPoint,InfoPurview,Fname,0 as Changes,AddDate,Popular,3 as ChannelID,Hits,Inputer As username From KS_DownLoad Where DelTF=0 And Verific=1 And keywords like ''%儿科学%'' Union All select ID,Title,Tid,0 as ReadPoint,0 as InfoPurview,Fname,0 as Changes,AddDate,Popular,5 as ChannelID,Hits,Inputer As username From KS_Product Where DelTF=0 And Verific=1 And keywords like ''%儿科学%'' Union All select ID,Title,Tid,ReadPoint,InfoPurview,Fname,Changes,AddDate,Popular,111 as ChannelID,hits,Inputer As username From KS_U_esf Where DelTF=0 And Verific=1 And keywords like ''%儿科学%'') a  ORDER BY ADDDATE DESC,ID Asc



2、

Select  ID,Tid,Title,ChannelID,InfoID,Intro,AddDate,Fname From KS_ItemInfo Where Verific=1 and deltf=0 And (Title like ''%瀛ょ%'' or Title like ''%ょ嫭%'' or Title like ''%嫭鐥%'' or Title like ''%鐥囧%'' or Title like ''%囧効%'' or Title like ''%効绔%'' or Title like ''%绔ヨ%'' or Title like ''%ヨ%'' or Title like ''%涓%'' or Title like ''%涓鸿%'' or Title like ''%鸿瘎%'' or Title like ''%瘎瀹%'' or Title like ''%瀹氶%'' or Title like ''%氶噺%'' or Title like ''%噺琛%'' or Title like ''%琛s%'' or Title like ''%st%'' or Title like ''%ty%'' or Title like ''%yp%'' or Title like ''%pe%'' or Title like ''%e=%'' or Title like ''%=0%'') Order by ID Desc

3、

SELECT TOP 1 I.ChannelID,I.InfoID as ID,I.Title,I.Tid,I.Intro,I.PhotoUrl,I.AddDate,I.Inputer,I.Popular,I.Fname,I.Hits FROM [KS_ItemInfo] I  Inner Join KS_Channel C On I.ChannelID=C.ChannelID Where C.ChannelStatus=1 And I.Verific=1 And I.DelTF=0 And I.Tid In (Select ID From KS_Class Where DelTF=0 AND TS LIKE '%20109354559082%') And I.Recommend=1 And I.Slide=1 And I.PhotoUrl<>'' ORDER BY I.IsTop Desc,id desc

4、

Select  ID,Tid,Title,Intro,AddDate,Fname From KS_Article Where Verific=1 and deltf=0 And (Title like ''%北京%'' or Title like ''%京四%'' or Title like ''%四月%'' or Title like ''%月一%'' or Title like ''%一日%'' or Title like ''%日孤%'' or Title like ''%孤独%'' or Title like ''%独症%'' or Title like ''%症家%'' or Title like ''%家长%'' or Title like ''%长培%'' or Title like ''%培训%'') Order by ID Desc

5、

select Count(1) from KS_ItemInfo  Where Verific=1 and deltf=0 And (Title like '%瀛ょ%' or Title like '%ょ嫭%' or Title like '%嫭鐥%' or Title like '%鐥囧%' or Title like '%囧効%' or Title like '%効绔%' or Title like '%绔ヨ%' or Title like '%ヨ%' or Title like '%涓%' or Title like '%涓鸿%' or Title like '%鸿瘎%' or Title like '%瘎瀹%' or Title like '%瀹氶%' or Title like '%氶噺%' or Title like '%噺琛%' or Title like '%琛s%' or Title like '%st%' or Title like '%ty%' or Title like '%yp%' or Title like '%pe%' or Title like '%e=%' or Title like '%=0%')







我自定义的SQL中没有语句,是系统中的吗?请帮助。

 
  支持(17) | 反对(17) 回到顶部顶端 回到底部底部
xiaohua_201236 当前离线

189

主题

0

广播

0

粉丝
添加关注
级别:一年级

用户积分:316 分
登录次数:8 次
注册时间:2012/3/6
最后登录:2012/10/31
xiaohua_201236 发表于:2012/3/9 14:11:18   | 只看该作者 查看该作者主题 沙发 
 
  支持(17) | 反对(17) 回到顶部顶端 回到底部底部
xiaohua_201236 当前离线

189

主题

0

广播

0

粉丝
添加关注
级别:一年级

用户积分:316 分
登录次数:8 次
注册时间:2012/3/6
最后登录:2012/10/31
xiaohua_201236 发表于:2012/3/9 14:12:39   | 只看该作者 查看该作者主题 藤椅 
 
  支持(13) | 反对(11) 回到顶部顶端 回到底部底部
xiaohua_201236 当前离线

189

主题

0

广播

0

粉丝
添加关注
级别:一年级

用户积分:316 分
登录次数:8 次
注册时间:2012/3/6
最后登录:2012/10/31
xiaohua_201236 发表于:2012/3/9 14:44:15   | 只看该作者 查看该作者主题 板凳 
科汛智能建站系统
来看看,顺便占个位置
 
  支持(3) | 反对(2) 回到顶部顶端 回到底部底部
ccnf 当前离线

104

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:103 分
登录次数:2 次
注册时间:2011/12/5
最后登录:2012/3/28
ccnf 发表于:2012/3/9 15:00:26   | 只看该作者 查看该作者主题 报纸 
 
  支持(1) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.14063秒 powered by KesionCMS 9.0