select * from。。。中不能引用自定义函数么?
比如表 P_History数据库(Access)的数据如下:
C_ID M_IDP_ID
20120102010010
20120103010010
20120104010011
20120105010031
20120106020010
20120107020012
20120108020010
20120109020011
20120110010032
...
C_IDM_IDP_ID
2012010201001ok
2012010301001ok
2012010401001Fail
2012010501003Fail
2012010602001ok
2012010702001Unknow
2012010802001ok
2012010902001Fail
2012011001003Unknow
...
function Str_Days(byval str_D as string) as string
if astr_D ="0"then
Str_Days="ok"
elseif astr_D ="1"then
Str_Days="Fail"
elseif astr_D ="2"then
Str_Days="Unknow"
endif
end function
select C_ID,M_ID,Str_Days(P_ID) from P_History