主题:VFP帮忙看下面一段找码提示“找不到别名”
thisform.pageframe1.page1.grid1.recordsource="sele 品名,类别,规格,单位,sum(数量) as '数量' from &data where like('*&hea.*',品名) group by 品名 into cursor temp1"
nCur=_tally
sele * from &data.c where like('*&hea.*',品名) into cursor temp2
if !used("temp1")
use temp1 in 0
endif
sele temp1
后改为:thisform.pageframe1.page1.grid1.recordsource="sele 品名,sum(数量) as '数量' from &data where like('*&hea.*',品名) group by 品名 into cursor temp1"
就可找到别名,为什么呢?
nCur=_tally
sele * from &data.c where like('*&hea.*',品名) into cursor temp2
if !used("temp1")
use temp1 in 0
endif
sele temp1
后改为:thisform.pageframe1.page1.grid1.recordsource="sele 品名,sum(数量) as '数量' from &data where like('*&hea.*',品名) group by 品名 into cursor temp1"
就可找到别名,为什么呢?