ariftheruvath
Programmer
VFP 9.0 return an error message with the following code :-
mmm=SQLExec(hr_handle,"set nocount on select (select emp_name from emp_master where emp_ID=b.emp_ID) name, "+;
"(select gross from pay_data where emp_ID=b.emp_ID and "+;
"(_year*416)+(_month*32)=b.yy_) gross,YY_/416 year,(YY_%416)/32 month,emp_ID from "+;
"(select emp_ID,max(intYY) yy_ from "+;
"(select emp_ID,min((_year*416)+(_month*32)) intYY from pay_data group by emp_ID,gross ) t "+;
" group by emp_ID ) b "+;
" where dbo.ifcancelled(emp_ID)=0 ",'lastINC')
if mmm<1
aerr(abcd)
wait wind abcd(1,3)
endif
got an error message "00000001:Incorrect function" with aerror()
but the same Sql Query works well when i run it right at SQL SERVER
pls help..
mmm=SQLExec(hr_handle,"set nocount on select (select emp_name from emp_master where emp_ID=b.emp_ID) name, "+;
"(select gross from pay_data where emp_ID=b.emp_ID and "+;
"(_year*416)+(_month*32)=b.yy_) gross,YY_/416 year,(YY_%416)/32 month,emp_ID from "+;
"(select emp_ID,max(intYY) yy_ from "+;
"(select emp_ID,min((_year*416)+(_month*32)) intYY from pay_data group by emp_ID,gross ) t "+;
" group by emp_ID ) b "+;
" where dbo.ifcancelled(emp_ID)=0 ",'lastINC')
if mmm<1
aerr(abcd)
wait wind abcd(1,3)
endif
got an error message "00000001:Incorrect function" with aerror()
but the same Sql Query works well when i run it right at SQL SERVER
pls help..