EXEC SQL DECLARE Cur_TranRec CURSOR for
SELECT MessType,Account,TranAmount,TranNum,ClientTime,ClientDate,IdenCode,PosCkNum,ResePrivate,DevID,POSScNum
from PosTranRec
WHERE MessType ="0200"
ORDER BY ClientDate;
if(SQLCODE){
printf("Error declare Cur_TranRec SQLCODE=[%d]\n",SQLCODE);
return -1;
}
EXEC SQL OPEN Cur_TranRec;
while(1){
EXEC SQL FETCH Cur_TranRec INTO
:spMsgType,:spAccountNo,:spTranAmt,:spClientTraceNum,:spClientTime,:spClientDate,:spAcqID,:spPOSCkNum,:spBatchNo,:spDevID,:spPOSScNum;
printf("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n \n",spMsgType,spAccountNo,spTranAmt,spClientTraceNum,spClientTime,spClientDate,spAcqID,spPOSCkNum,spBatchNo,spDevID,spPOSScNum);
if(sqlca.sqlcode ==1403){
printf( "ERROR FETCH Cur_TranRec SQLCODE[%d]\n",SQLCODE);
EXEC SQL CLOSE Cur_TranRec;
break;
}
else{
if(sqlca.sqlcode != 0){
printf( "ERROR FETCH Cur_TranRec SQLCODE[%d]\n",SQLCODE);
EXEC SQL CLOSE Cur_TranRec;
TSPDbclose();
break;
}
}
±¨´í1002 ÇóÖúÁË{{
exp user/password@dbname file=c:\table.dmp tables=jbitaku,jbitakum grants=y
È»áá°´»Ø車鍵 說Ã÷:¡¡ user/password@dbname ¡¡·Ö別±íʾÓÃ戶Ãû£¬ÃÜ碼ºÍ·þ務Ãû f ......
SELECT * from (SELECT A.*, ROWNUM RN from (SELECT * from t_out_logon) A WHERE ROWNUM <= 30)WHERE RN >= 21
SELECT A.* from (SELECT t.*,rownum rn from t_out_logon t WHERE ROWNUM <= 30) A WHERE ......