I have a cursor as tempBatchSibNew and I created a table and now I want to insert some records into my table. For that I did my code like this.
When I run my code it says Data type mismatch. What is the mistake in my code?
Thank you
Code:
CREATE TABLE C:\TEMPFILES\Grn_qty (nPoDtlID n(15),cGrnNO c(15),CwhRatio c(15),cDocType c(15),cDocNo c(15),nTrnsQty n(15),nGrnQtyVal n(10,2))
SELECT tempBatchSibNew
SCAN
INSERT INTO C:\TEMPFILES\Grn_qty (nPoDtlID,cGrnNO,CwhRatio) ;
VALUES (tempBatchSibNew.nPoDtlID,tempBatchSibNew.cGrnNO,tempBatchSibNew.CwhRatio)
ENDSCAN
SELECT tempBatchTransDt
SCAN
UPDATE C:\TEMPFILES\Grn_qty SET nTrnsQty=tempBatchTransDt.nTrnsQty,nGrnQtyVal=GrnQtyVal WHERE nPoDtlID=tempBatchSibNew.nPoDtlID
ENDSCAN
Thank you