读书人

SELECT有关问题

发布时间: 2012-02-05 12:07:14 作者: rapoo

SELECT问题
在VFP9.0中,我想提取表CCX中字段QSPBH(C型)头字母为 '3 '的所有记录,遇到一个奇怪的现象:BROW FOR QSPBH= '3 ' 没有问题,SELECT * FROM CCX WHERE QSPHH= '3 '为空,但SELECT * FROM CCX WHERE SUBS(QSPHH,1,1)= '3 '又行了。不知道为什么?

[解决办法]
VFP9 HELP:
Comparison Description
=
Equal

Note
When you use the equal (=) operator with strings, it functions differently depending on the setting of SET ANSI. When SET ANSI is set to OFF, Visual FoxPro compares strings only to the end of the shorter string. When SET ANSI is set to ON, Visual FoxPro follows ANSI standards for string comparisons. For more information, see SET ANSI and SET EXACT.


读书人网 >VFP

热点推荐