Though there are no errors I always get no rows affected.
What could be the reason for this?
INSERT INTO CONTHIST
(USERID, ACCOUNTNO, SRECTYPE, RECTYPE, ONDATE, ONTIME, ACTVCODE, RESULTCODE, STATUS, DURATION, UNITS, REF, NOTES, LINKRECID,
LOPRECID, CREATEBY, CREATEON, CREATEAT, LASTUSER, LASTDATE, LASTTIME, RECID)
SELECT CONTACT1.CREATEBY, CONTACT1.ACCOUNTNO, 'C' AS Expr1, 'CI' AS Expr2, CONTACT1.CREATEON, CONTACT1.CREATEAT, 'BRO' AS Expr5,
CONTACT2.USERDEF12, '0' AS Expr4, '0' AS Expr3, '0' AS Expr6, 'Brochure Request' AS Expr7, '' AS Expr8, '' AS Expr9, '' AS Expr10,
CONTACT1.CREATEBY AS Expr11, CONTACT1.CREATEON AS Expr12, CONTACT1.CREATEAT AS Expr13, CONTACT1.CREATEBY AS Expr14,
CONTACT1.CREATEON AS Expr15, CONTACT1.CREATEAT AS Expr16, CONTACT1.RECID
FROM CONTACT1 INNER JOIN
CONTACT2 ON CONTACT1.ACCOUNTNO = CONTACT2.ACCOUNTNO
WHERE (CONTACT1.CREATEBY <> NULL) OR (CONTACT2.USERDEF12 <> NULL)
What could be the reason for this?
INSERT INTO CONTHIST
(USERID, ACCOUNTNO, SRECTYPE, RECTYPE, ONDATE, ONTIME, ACTVCODE, RESULTCODE, STATUS, DURATION, UNITS, REF, NOTES, LINKRECID,
LOPRECID, CREATEBY, CREATEON, CREATEAT, LASTUSER, LASTDATE, LASTTIME, RECID)
SELECT CONTACT1.CREATEBY, CONTACT1.ACCOUNTNO, 'C' AS Expr1, 'CI' AS Expr2, CONTACT1.CREATEON, CONTACT1.CREATEAT, 'BRO' AS Expr5,
CONTACT2.USERDEF12, '0' AS Expr4, '0' AS Expr3, '0' AS Expr6, 'Brochure Request' AS Expr7, '' AS Expr8, '' AS Expr9, '' AS Expr10,
CONTACT1.CREATEBY AS Expr11, CONTACT1.CREATEON AS Expr12, CONTACT1.CREATEAT AS Expr13, CONTACT1.CREATEBY AS Expr14,
CONTACT1.CREATEON AS Expr15, CONTACT1.CREATEAT AS Expr16, CONTACT1.RECID
FROM CONTACT1 INNER JOIN
CONTACT2 ON CONTACT1.ACCOUNTNO = CONTACT2.ACCOUNTNO
WHERE (CONTACT1.CREATEBY <> NULL) OR (CONTACT2.USERDEF12 <> NULL)