关于查询“中文”的问题

hustcat 2003-12-18 02:49:37
我现在需要查询一个字段,查询出它是中文或者是0-9。sql语句这样写怎么不行呢?
select s.ID,s.FileName,s.Info,s.Grade,s.Chinese,s.Crack,s.Best,s.Member,s.AddDate,s.TotalHits,s.Brief,c.ID,c.ClassName from Software s inner join Class c on s.ClassID=c.ID where s.Hidden=0 and s.PostType<>1 and not((ASC(s.FileName) between 48 and 57) or (ASC(s.FileName) between 65 and 90) or (ASC(s.FileName) between 97 and 122)) order by s.ID DESC

系统提示说ASC错误,但是在access下又可以。请问如何修改。
...全文
28 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
hustcat 2003-12-18
  • 打赏
  • 举报
回复
谢谢 xzx760815 和gmlxf ,测试通过。。

谢谢。
xzx760815 2003-12-18
  • 打赏
  • 举报
回复
SQL SERVER中求ASCII值要用ASCII函數﹐不是ASC函數。你換過來試試﹗
victorycyz 2003-12-18
  • 打赏
  • 举报
回复
列出表结构、查询目的、结果集举例。
gmlxf 2003-12-18
  • 打赏
  • 举报
回复
sql中用:
ascii(s.FileName)

34,575

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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