spMFUpdateTableWithLastModifiedDate¶
Signature¶
EXEC dbo.spMFUpdateTableWithLastModifiedDate
@TableName = N'MFCustomer',
@UpdateMethod = 1,
@Return_LastModified = NULL OUTPUT,
@Update_IDOut = NULL OUTPUT,
@RetainDeletions = 0,
@IsDocumentCollection = 0,
@ProcessBatch_ID = NULL OUTPUT,
@debug = 0;
Returns¶
INT: 1 on success; -1 on error.
Parameters¶
- @TableName
Type: SYSNAME
Required: Yes
Description: Class table name.
- @UpdateMethod
Type: INT
Required: Yes
Description: Update direction/mode (1 = M-Files to MFSQL).
- @Return_LastModified
Type: DATETIME
Required: No (OUTPUT)
Description: Returns the new last modified date.
- @Update_IDOut
Type: INT
Required: No (OUTPUT)
Description: Returns the Update ID from
MFUpdateHistory
.
- @RetainDeletions
Type: BIT
Required: No (default = 0)
Description: Set to 1 to retain deletions in class table.
- @IsDocumentCollection
Type: BIT
Required: No (default = 0)
Description: Set to 1 if the class refers to a document collection.
- @ProcessBatch_ID
Type: INT
Required: No (OUTPUT)
Description: References the ID of the ProcessBatch logging table.
- @debug
Type: SMALLINT
Required: No (default = 0)
Description: Debug level.
Purpose¶
Procedure that update MF Class table using the last MFUpdate date and returning the new last Update date
Examples¶
DECLARE @last_Modified datetime
EXEC spMFUpdateTableWithLastModifiedDate
@UpdateMethod = 1,
@TableName = 'MFSOInvoiced',
@Return_LastModified = @last_Modified output
SELECT @last_Modified
Changelog¶
Date |
Author |
Description |
2022-09-02 |
LC |
Update to include RetainDeletions and DocumentCollections |
2019-08-30 |
JC |
Added documentation |
2019-07-07 |
LC |
Change sequnce of paramters, add new method to include updating deletions. |
2018-10-22 |
LC |
Add 1 second to last modified data to avoid reprocessing the last record. |
2018-10-22 |
LC |
Modify logtext description to align with reporting |
2017-11-23 |
LC |
LastModified column name date localization |
2017-06-30 |
AC |
Update Logging to make use of new @ProcessBatchDetail_ID to calculate duration |
2017-06-30 |
AC |
Update Logging of MFLastModifiedDate as a Column and Value pair |
2017-06-30 |
AC |
Update LogStatusDetail to be consisted with convention of using Started and Completed as the status descriptions |
2017-06-29 |
AC |
Fix bug introduced by fix of Bug #1049 |
2016-10-08 |
LC |
Fix bug with null values |
2016-08-25 |
LC |
Add the Update_ID from UpdateTable as an output on this procedure also to pass it through |