当前位置: 代码迷 >> VFP >> SELECT有关问题
  详细解决方案

SELECT有关问题

热度:6371   发布时间:2013-02-26 00:00:00.0
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.


  相关解决方案