I have added an auto incrementing field (nid) to several tables.
ALTER TABLE dispdetail ADD COLUMN nid i AUTOINC NEXTVALUE RECCOUNT() +1 DEFAULT RECNO()
When inserting into this table now i am getting data type mismatch error. All fields are correct in the insert sql statement however when you check the table the auto increment field is empty.
With the append blank and replace statment's everything works correctly and the new auto increment id is correct.
There is table buffering of 5 in place.
Does anybody have any idea of what piece of the puzzle i am missing?? Thank you for your response.
SELECT dispdetail
APPEND BLANK
replace dispdetail.cdinvno WITH temp_salesdetail.cinvno, ;
dispdetail.cdispno WITH pdispno, ;
dispdetail.cilinekey WITH temp_salesdetail.cilinekey,;
dispdetail.cqty WITH lcQty, ;
dispdetail.nprice WITH temp_salesdetail.ntotretail, ;
dispdetail.cdesc2 WITH temp_salesdetail.cdesc, ;
dispdetail.cdetailid WITH temp_salesdetail.cdetailid, ;
dispdetail.cstationid with pcWsID
INSERT INTO dispdetail ;
(cdinvno,cdispno, ;
cilinekey,cqty, ;
nprice, ;
cdesc2,cdetailid, ;
crecstatus,tcr8stamp, ;
cstationid) ;
VALUES ;
(temp_salesdetail.cinvno, pdispno, ;
temp_salesdetail.cilinekey, lcQty, ;
temp_salesdetail.ntotretail, ;
temp_salesdetail.cdesc, temp_salesdetail.cdetailid, ;
"A", DATETIME(), ;
pcWsID)
ALTER TABLE dispdetail ADD COLUMN nid i AUTOINC NEXTVALUE RECCOUNT() +1 DEFAULT RECNO()
When inserting into this table now i am getting data type mismatch error. All fields are correct in the insert sql statement however when you check the table the auto increment field is empty.
With the append blank and replace statment's everything works correctly and the new auto increment id is correct.
There is table buffering of 5 in place.
Does anybody have any idea of what piece of the puzzle i am missing?? Thank you for your response.
SELECT dispdetail
APPEND BLANK
replace dispdetail.cdinvno WITH temp_salesdetail.cinvno, ;
dispdetail.cdispno WITH pdispno, ;
dispdetail.cilinekey WITH temp_salesdetail.cilinekey,;
dispdetail.cqty WITH lcQty, ;
dispdetail.nprice WITH temp_salesdetail.ntotretail, ;
dispdetail.cdesc2 WITH temp_salesdetail.cdesc, ;
dispdetail.cdetailid WITH temp_salesdetail.cdetailid, ;
dispdetail.cstationid with pcWsID
INSERT INTO dispdetail ;
(cdinvno,cdispno, ;
cilinekey,cqty, ;
nprice, ;
cdesc2,cdetailid, ;
crecstatus,tcr8stamp, ;
cstationid) ;
VALUES ;
(temp_salesdetail.cinvno, pdispno, ;
temp_salesdetail.cilinekey, lcQty, ;
temp_salesdetail.ntotretail, ;
temp_salesdetail.cdesc, temp_salesdetail.cdetailid, ;
"A", DATETIME(), ;
pcWsID)