sql字符串

来源:百度知道 编辑:UC知道 时间:2024/06/05 19:21:02
strSql="select * from table where [..] and "
str="and"
把strSql字符串里的and去掉
能这样写吗?
strSql=strSql-str

不能!
一般是用left()或right()来取前段或后段。
比如你这个可能可以这样写:
strSql = left(strSql, length(strSql)-4)

减4是因为 "and " 连空格长度为4。 至于 left 和 length 函数,要看你用的语言中的拼写了。

一般不能

什么语言?
ASP?