Vfp9与ORACAL数据库连通后,下面语句如何写才对?
Vfp9与ORACAL数据库连通后,下面语句如何写才对:
Frsbh类型:C
ss1=sqlexec(connectid,"select * from frdb where LEFT(frsbh,4)> 5301","frdb")--无反应
ss1=sqlexec(connectid,"select * from dj_nsrxx where LEFT(nsrsbh,4)> "5301"","dj_nsrxx")--提示函数名缺少
多谢各位老师指教
[解决办法]
oracle 中改成如下。
ss1=sqlexec(connectid,"select * from frdb where substr(frsbh,1,4)> 5301","frdb")
[解决办法]
ORACLE没有LEFT 函数
ss1=sqlexec(connectid,"select * from frdb where substr(frsbh,1,4)> '5301'","frdb")
[解决办法]
or
ss1=sqlexec(connectid,"select * from frdb where CAST(substr(frsbh,1,4) as NUMBER)> 5301","frdb")