毫不保留的爱08中字:这一句不对应怎么改 str4="select * from yymess

来源:百度文库 编辑:高考问答 时间:2024/05/06 17:41:41
这一句不对应怎么改 str4="select * from yymess where address<>'' and userid=&idd order by data desc"

在这句中,where address<>'' 中的引号不行,它会使程序认为到这里就是select 的结束了。可以用别的代替“不为空”,比如用 where LEN(ALLT(address))>0
修改:
哈,用“where address<>null ”恐怕不行吧,就算是用“空值”,也要用“not is null”,
我上面说的用“where LEN(ALLT(address))>0”是检测该字段值去掉空格后的长度,因为一般地址字段都应该是C型的吧。

str4="select * from yymess where address<>null and userid=&idd order by data desc"
这样看看!