sql add statement access
snippet in sql

sql add statement access

user7056

INSERT INTO tblProducts (ProductName,
   CategoryDescription, UnitPrice)
VALUES ('Support Renewal', 'Multi-User', 99);

sql add statement access

user8016

PARAMETERS LastDateToKeep DateTime;
INSERT INTO tblContactEventsHistory
  (ContactID, ContactDateTime, ContactEventType, ContactNotes )
 SELECT tblContactEvents.ContactID, tblContactEvents.ContactDateTime,
   tlkpContactEventTypes.ContactEventTypeDescription,
   tblContactEvents.ContactNotes
  FROM tlkpContactEventTypes
  INNER JOIN (tblContactEvents
   LEFT JOIN tblContactEventsHistory
   ON (tblContactEvents.ContactID = tblContactEventsHistory.ContactID)
    AND (tblContactEvents.ContactDateTime =
     tblContactEventsHistory.ContactDateTime))
  ON tlkpContactEventTypes.ContactEventTypeID =
   tblContactEvents.ContactEventTypeID
 WHERE (tblContactEvents.ContactDateTime<[LastDateToKeep])
  AND (tblContactEventsHistory.ContactID Is Null);