难度较大的一个sql语句,请各路兄弟帮忙。

sxsgssgs 2004-04-01 01:32:02
Xbiao=int(Xbiao)
Ybiao=int(Ybiao)
Rname=int(Rname)
MaxX=Xbiao+Rname
MinX=Xbiao-Rname
MaxY=Ybiao+Rname
MinY=Ybiao-Rname

set rs=server.createobject("ADODB.Recordset")

strSQL = "select * from object where Xbiao in("&MinX&","&MaxX&") and Ybiao in("&MinY&" ,"&MaxY&")"
'Response.Write strsql
'Response.end
rs.Open strSQL,conn,1,1

我想找出Xbiao在MinX和MaxX之间且Ybiao在MinY和MaxY之间的记录,请问我这种写法对吗????急。。。。。
...全文
45 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
baby21st 2004-04-01
  • 打赏
  • 举报
回复
MaxX=cint(Xbiao+Rname)
MinX=cint(Xbiao-Rname)
MaxY=cint(Ybiao+Rname)
MinY=cint(Ybiao-Rname)
pizixt 2004-04-01
  • 打赏
  • 举报
回复
strSQL="select * from object where ( Xbiao between "&MinX&" and "&MaxX&") and ( Ybiao between "&MinY&" and "&MaxY&")"
sxsgssgs 2004-04-01
  • 打赏
  • 举报
回复
up
sxsgssgs 2004-04-01
  • 打赏
  • 举报
回复
up
sxsgssgs 2004-04-01
  • 打赏
  • 举报
回复
up

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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