vfp中如何用select语句查询一系列相似字段名的字段?

2020-10-10 教育 86阅读
如果你想查询所有KM开头的字段的话: LOCAL liI as Integer, lcFieldName as Character, lcFieldList as CharacterlcFieldList = "" FOR liI = 1 TO FCOUNT( "CJK" )
lcFieldName = FIELD( liI, "CJK" )
IF LOWER( LEFT( lcFieldName, 2 ) ) = "km"
lcFieldList = lcFieldList + ", " + lcFieldName
ENDIF
ENDFOR IF ! EMPTY( lcFieldList )
lcFieldList = SUBSTR( lcFieldList, 3 )
SELECT &lcFieldList. FROM cjk
ENDIF 只要修改 IF LOWER( LEFT( lcFieldName, 2 ) ) = "km" 这句,就可以查询其它类型的相似字段了
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com