---
title: "MDS v4.6.0 Hotfix"
canonical: "https://servicedesk.maxgeo.com/space/MDS/1393328151/MDS%20v4.6.0%20Hotfix"
format: markdown
---
# Table of Contents

> Macro (toc)


  


# > Macro (anchor)

MDS v4.6.0 Cumulative Patch(10Mar2014)

<span style="color: #ff0000">Note:This patch is ONLY required for client on v4.6.0 that’s before 10 Mar 2014 version. In that case, they need to apply this patch first, before can to any future cumulative patches.</span>


This is a cumulative patch (as at 10/MAR/2014) for MDS v4.6.0.

This tool patches your current MDS schema with enhancements on the following objects:

  -- Change Min_pct column data type from decimal(18,2) to decimal(18,3)

  -- Remove FK_tblDHCollHistory_tblDHColl_DataSet_Hole_ID

  -- Remove FK_tblLSSiteHistory_tblLSSite_DataSet_Site_ID_Line_ID

  -- Remove FK_tblPTSiteHistory_tblPTSite_DataSet_Site_ID

  -- New table tblLIBOxidationStyle

  -- Added column tblDHOxidation.Oxid_Code/Oxid_Int/Oxid_Style

  -- Change tblSYSQCReference.Data_Source to be NOT NULL

  -- Rename tblSYSSRSCoordinateSystemTx.DataSource to Data_Source

  -- Changed tblSYSAssBatch.Lab_Job_Date from computed column to a standard column

  -- Changed tblSYSAssBatch.Lab_Final_Date from standard column to computed column

  -- Update the default values in tblSYSConfigRelation/tblSYSConfigRelationField for 'LHNORM' type records

  -- Added trigger TR_itblSYSConfigRelation

  -- Updated tblDHCollHistory.Survey_By FK to tblLIBPerson

  -- Updated tblLSSiteHistory.Survey_By FK to tblLIBPerson

  -- Updated tblPTSitelHistory.Survey_By FK to tblLIBPerson

  -- Removed FK on tblSYSAssBatchDetail to tblSYSAssLabElementAlias/tblSYSUnits/tblSYSAssLabMethod/tblSYSAssElement/tblSYSAssMethodGeneric

  -- Changed tblSYSAssDispatchSampleRegister.DispatchID_Group to INT

  -- Added column tblSYSAssDispatchHeader.Lease_ID

  -- New view tblVWLSMaxAssays

  -- New view tblVWLSSamp

  -- New view tblVWPTMaxAssays

  -- Renamed view tblVWDHQCAssays to tblVWDHAssaysQC

  -- Renamed view tblVWLSQCAssays to tblVWLSAssaysQC

  -- Renamed view tblVWPTSampAssays to tblVWPTAssays

  -- Renamed view tblVWPTSampQCAssays to tblVWPTAssaysQC

  -- Renamed view tblVWStandardQCAssays to tblVWStandardAssaysQC

  -- Changed tblDHMagSus.Sample_Type allow NULL and updated associated trigger

      Added default for tblDHMagSus.Instrument & Instrument_FactorCode

  -- Changed tblDHMagSusPT.Sample_Type allow NULL and updated associated trigger

      Added default for tblDHMagSusPT.Instrument & Instrument_FactorCode

  -- Changed tblLSMagSus.Sample_Type allow NULL and updated associated trigger

      Added default for tblLSMagSus.Instrument & Instrument_FactorCode

  -- Changed tblLIBMagSusFactor.Multiplication_Factor to decimal(18,9)

  -- Changed tblLSMetSamp.Sample_Type not allow NULL

  -- Changed tblPTMetSamp.Sample_Type not allow NULL

  -- Changed tblPTSamp.Sample_Type not allow NULL

  -- Changed tblContractActivityLog.Operator_Assistant1 & Operator_Assistant2 to allow NULL

   -- Updated ProcessIncomingDataDriver SP

  -- Added ts field on DataShed tables

  -- Updated QAQCR configuration to reflect changes in v4.6

  -- Updated Data_Source column to be nvarchar(255)

  -- Updated tblSYSConfigRelation.IX_tblSYSConfigRelation_SourceTable (7/03/2014)

  -- Updated tblVWPTSamp triggers (7/03/2014)

  -- New view tblVWPTSampLogging (10/03/2014)

  -- New view tblVWPTGeoChemLogging (10/03/2014)


Following changes are model specific:

For non-Production models:

  -- Removed FS tables/views


For Production model:

  -- Remove FK_tblFSSiteHistory_tblFSSite_DataSet_Site_ID_Line_ID

  -- Updated tblFSSiteHistory.Survey_By FK to tblLIBPerson

  -- New view tblVWFSAssaysQC

  -- New view tblVWFSSamp

  -- Changed tblFSMagSus.Sample_Type allow NULL and updated associated trigger

      Added default for tblFSMagSus.Instrument & Instrument_FactorCode

  -- Changed tblFSMetSamp.Sample_Type not allow NULL

  -- Changed tbtblProdDailyUGDevelopment.LocationID to NVARCHAR(25)

      New FK_tblProdDailyUGDevelopment_tblProdLocations_LocationID

      New CK_tblProdDailyUGDevelopment_Development_Date

  -- Renamed tblProdBlasting.OreSourceID to BlockID

  -- Renamed tblProdDailyTrucking.OreSourceID to BlockID

      New FK_tblProdDailyTrucking_tblProdBlock_BlockID

      New FK_tblProdDailyTrucking_tblProdLocations_To_LocationID

  -- Renamed tblProdBlock.OreSource_Type to Block_Type

  -- New FK_tblProdBlockPlanned_tblProdBlock_BlockID

  -- Updated tblProdSamp trigger


# > Macro (anchor)

MDS Hotfix - Audit table permission

<span style="color: #000000">This hotfix patches your current MDS schema audit table access permissions!</span>


# > Macro (anchor)

MDS Hotfix - Schema Audit Mechanism

<span style="color: #000000">This hotfix fix patches your current MDS schma with an enhanced schema audit mechanism as at 22 May 2014.</span>


# > Macro (anchor)

MDS v4.6.0 Cumulative Updates

<span style="color: #000000">This is a cumulative update (as at 27/Jun/2014) for MDS v4.6.0.</span>


<span style="color: #000000">This tool updates your current MDS schema with enhancements on the following objects:</span>

<span style="color: #000000">  -- Update tblSYSConversionFactor values (20 Mar 2014)</span>

<span style="color: #000000">  -- Update QAQCR configuration settings (20 Mar 2014)</span>

<span style="color: #000000">  -- Enhanced usp_ProcessIncomingDataDriver (27 Mar 2014)</span>

<span style="color: #000000">  -- Enhanced insert/update triggers for tblVWPTGeoChemLogging (31 Mar 2014)</span>

<span style="color: #000000">  -- Enhanced insert/update triggers for tblVWPTSampLogging (31 Mar 2014)</span>

<span style="color: #000000">  -- Enhanced usp_DataAssayMergingProcess (31 Mar 2014)</span>

<span style="color: #000000">  -- Update tblDHPhoto.Depth_From/Depth_To to allow NULL (4 Apr 2014)</span>

<span style="color: #000000">       Update TR_iutblDHPhoto_Valid_Intervals (4 Apr 2014)</span>

<span style="color: #000000">  -- Update tblLSPhoto.Length_From/Length_To to allow NULL (4 Apr 2014)</span>

<span style="color: #000000">       Update TR_iutblLSPhoto_Valid_Intervals (4 Apr 2014)</span>

<span style="color: #000000">  -- Add element 'BaO' into tblSYSAssElement (4 Apr 2014)</span>

<span style="color: #000000">  -- Update tblSYSNormAttributeDef set Param1 = 'Ind' for AttributeName = 'IN_PPM' (4 Apr 2014)</span>

<span style="color: #000000">  -- Enhanced usp_AdminCleanUpDataShedObjects (9 Apr 2014)</span>

<span style="color: #000000">  -- Enhanced system DAL structure (9 Apr 2014)</span>

<span style="color: #000000">  -- Enhanced insert/update triggers on the following tables to better handle situation when PK column values updated (14 Apr 2014)</span>

<span style="color: #000000">       tblDHCoreRecoveryRun</span>

<span style="color: #000000">       tblDHGeotechRMR</span>

<span style="color: #000000">       tblDHGeotechRQD</span>

<span style="color: #000000">       tblDHMetSamp</span>

<span style="color: #000000">       tblDHMetSampQC</span>

<span style="color: #000000">       tblDHSamp</span>

<span style="color: #000000">       tblDHSampQC</span>

<span style="color: #000000">       tblLIBContractType</span>

<span style="color: #000000">       tblLSMetSamp</span>

<span style="color: #000000">       tblLSMetSampQC</span>

<span style="color: #000000">       tblLSSamp</span>

<span style="color: #000000">       tblLSSampQC</span>

<span style="color: #000000">       tblPTMetSamp</span>

<span style="color: #000000">       tblPTMetSampQC</span>

<span style="color: #000000">       tblPTSamp</span>

<span style="color: #000000">       tblPTSampQC</span>

<span style="color: #000000">       tblStandardSamp</span>

<span style="color: #000000">       tblStandardSampQC</span>

<span style="color: #000000">       tblVWPTGeoChemLogging</span>

<span style="color: #000000">       tblVWPTSamp</span>

<span style="color: #000000">       tblVWPTSampLogging</span>

<span style="color: #000000">       tblXRFDHSamp</span>

<span style="color: #000000">       tblXRFDHSampQC</span>

<span style="color: #000000">       tblXRFSamp</span>

<span style="color: #000000">       tblXRFSampQC</span>

<span style="color: #000000">       tblXRFStandardSamp</span>

<span style="color: #000000">       tblXRFStandardSampQC</span>

<span style="color: #000000">  -- New column tblDHMetaData.Bit_Type (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWSites (30 Apr 2014)</span>

<span style="color: #000000">  -- New trigger TR_iutblSYSQCReferenceValue_Preferred to check Preferred 0 record exists (30 Apr 2014)</span>

<span style="color: #000000">  -- Enhancements on tblLSSurv (30 Apr 2014)</span>

<span style="color: #000000">       Renamed column DHSurvey_Method to LSSurvey_Method (30 Apr 2014)</span>

<span style="color: #000000">       Renamed column DHSurvey_Company to LSSurvey_Company (30 Apr 2014)</span>

<span style="color: #000000">       Renamed column DHSurvey_Operator to LSSurvey_Operator (30 Apr 2014)</span>

<span style="color: #000000">       Renamed column DHSurvey_Instrument to LSSurvey_Instrument (30 Apr 2014)</span>

<span style="color: #000000">       Dropped constraint FK_tblLSSurv_tblLIBDHSurveyMethod_DHSurvey_Method (30 Apr 2014)</span>

<span style="color: #000000">       New constraint FK_tblLSSurv_tblLIBSurveyMethod_LSSurvey_Method (30 Apr 2014)</span>

<span style="color: #000000">  -- New constraints on tblIncident (30 Apr 2014)</span>

<span style="color: #000000">       DF_tblIncident_Report_Internally</span>

<span style="color: #000000">       DF_tblIncident_Report_Externally</span>

<span style="color: #000000">  -- tblDHWeathering column Logged_By, Logged_Date changed to allow NULL and Weath_Code to not allow NULL (6 May 2014)</span>

<span style="color: #000000">  -- Updated FK_tblPTGeology_tblLIBOxidation_Weathering on table tblPTGeology (8 May 2014)</span>

<span style="color: #000000">  -- Enhanced TR_utblPTSamp_DataSet_SampleID (8 May 2014)</span>

<span style="color: #000000">  -- Enhanced insert/update/delete trigger on tblVWPTSampLogging (8 May 2014)</span>

<span style="color: #000000">  -- Enhanced insert/update/delete trigger on tblVWPTGeoChemLogging (8 May 2014)</span>

<span style="color: #000000">  -- Enhancements on tblLIBPerson changed Email fiedl to be nvarchar(1000) (11 Jun 2014)</span>

<span style="color: #000000">  -- Enhancements on tblLIBDriveID added DataSet field (11 Jun 2014)</span>

<span style="color: #000000">  -- Enhancements on tblSYSAssDispatchDetails (11 Jun 2014)</span>

<span style="color: #000000">       Dropped FK on Email_Copy_to and changed the field to be nvarchar(1000)</span>

<span style="color: #000000">       Dropped FK on Email_Job_to and changed the field to be nvarchar(1000)</span>

<span style="color: #000000">  -- Enhancements on tblStandardSamp (11 Jun 2014)</span>

<span style="color: #000000">       Renamed Hole_ID to Source_ID</span>

<span style="color: #000000">       Added Secondary_Source_ID</span>

<span style="color: #000000">       Added Source_Type</span>

<span style="color: #000000">       Added trigger TR_iutblStandardSamp_Source_ID</span>

<span style="color: #000000">  -- Enhancements on tblFSSite and related FS tables (11 Jun 2014)</span>

<span style="color: #000000">       Changed Site_ID to be nvarchar(100)</span>

<span style="color: #000000">       Updated PK column order</span>

<span style="color: #000000">       Updated relevant triggers to reflect above changes</span>

<span style="color: #000000">  -- Enhancements on tblFSMapping (11 Jun 2014)</span>

<span style="color: #000000">       Added Line_ID</span>

<span style="color: #000000">       Added Depth_From</span>

<span style="color: #000000">       Added Depth_To</span>

<span style="color: #000000">  -- Enhancements on tblFSMagSus (11 Jun 2014)</span>

<span style="color: #000000">       Enabled update cascade on FK_tblFSMagSus_tblLIBMagSusFactor_Instrument_FactorCode</span>

<span style="color: #000000">  -- enhanced usp_RenameDataSetHoleSample (26 Jun 2014)</span>

<span style="color: #000000">  -- enhanced usp_DataUpdateStandardSampHoleID (27 Jun 2014)</span>


<span style="color: #000000">Following changes are model specific:</span>

<span style="color: #000000">For Production model:</span>

<span style="color: #000000">  -- Update tblFSPhoto.Depth_From/Depth_To to allow NULL (4 Apr 2014)</span>

<span style="color: #000000">       Update TR_iutblFSPhoto_Valid_Intervals (4 Apr 2014)</span>

<span style="color: #000000">  -- Enhanced insert/update triggers on the following tables to better handle situation when PK column values updated (14 Apr 2014)</span>

<span style="color: #000000">       tblFSMetSamp</span>

<span style="color: #000000">       tblFSMetSampQC</span>

<span style="color: #000000">       tblFSSamp</span>

<span style="color: #000000">       tblFSSampQC</span>

<span style="color: #000000">       tblProdLocations</span>

<span style="color: #000000">       tblProdSamp</span>

<span style="color: #000000">       tblProdSampQC</span>

<span style="color: #000000">  -- Added default constraints for Depth_From/Depth_To and updated related check constraints on following face sampling tables (30 Apr 2014)</span>

<span style="color: #000000">       tblFSGeology</span>

<span style="color: #000000">       tblFSMagSus</span>

<span style="color: #000000">       tblFSMetaData</span>

<span style="color: #000000">       tblFSMetSamp</span>

<span style="color: #000000">       tblFSMetSampQC</span>

<span style="color: #000000">       tblFSSamp</span>

<span style="color: #000000">       tblFSSampQC</span>

<span style="color: #000000">  -- Enhancements on tblFSSurv (30 Apr 2014)</span>

<span style="color: #000000">       Renamed column DHSurvey_Method to FSSurvey_Method (30 Apr 2014)</span>

<span style="color: #000000">       Renamed column DHSurvey_Company to FSSurvey_Company (30 Apr 2014)</span>

<span style="color: #000000">       Renamed column DHSurvey_Operator to FSSurvey_Operator (30 Apr 2014)</span>

<span style="color: #000000">       Renamed column DHSurvey_Instrument to FSSurvey_Instrument (30 Apr 2014)</span>

<span style="color: #000000">       Dropped constraint FK_tblFSSurv_tblLIBDHSurveyMethod_DHSurvey_Method (30 Apr 2014)</span>

<span style="color: #000000">       New constraint FK_tblFSSurv_tblLIBSurveyMethod_FSSurvey_Method (30 Apr 2014)</span>

<span style="color: #000000">  -- Changed Face_Number/Drive_ID on tblFSSite to allow NULL (30 Apr 2014)</span>

<span style="color: #000000">  -- Changed Site_ID on all face sampling tables to be NVARCHAR(60) NOT NULL (30 Apr 2014)</span>

<span style="color: #000000">  -- Updated view tblVWFSMaxAssays (30 Apr 2014)</span>

<span style="color: #000000">  -- Modified tblProdReconciliation PK to include Monitoring_Type column (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdSamp (30 Apr 2014)</span>

<span style="color: #000000">  -- Removed FK_tblProdDailyTrucking_tblLIBMachinery_Contractor_Digger_No (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdEOMSurvey (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdProcessingMonthly (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdReconciliationPlanned (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdReconciliationReserve (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdRptReconciliation (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdRptReconPlanned (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdRptReconReserve (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdStockPileSummary (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdSurveyTotals (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdSurveyTrucking (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdTruckingCalculated (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdTruckingClaimed (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdTruckingMonthly (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdTruckingSurveyRpt (30 Apr 2014)</span>

<span style="color: #000000">  -- New view tblVWProdAssays (6 May 2014)</span>

<span style="color: #000000">  -- New view tblVWProdAssaysQC (6 May 2014)</span>

<span style="color: #000000">  -- New view tblVWProdSampQC (6 May 2014)</span>

<span style="color: #000000">  -- New FK FK_tblProdBlock_tblLIBMineLevel_Level (6 May 2014)</span>

<span style="color: #000000">  -- Updated trigger TR_iutblFSSamp_Valid_Intervals (6 May 2014)</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix - Redundent triggers on tblLIBStruct tables

<span style="color: #000000">This is for MDS v4.6.0 (or above)</span>

<span style="color: #000000">This hotfix removes following redundent triggers that had invalid table reference:</span>

<span style="color: #000000"> TR_utblLIBGeologyLineationType on tblLIBStructLineationType</span>

<span style="color: #000000"> TR_utblLIBGeologyPlaneIntensity on tblLIBStructPlaneIntensity</span>

<span style="color: #000000"> TR_utblLIBGeologyPlaneType on tblLIBStructPlaneType</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix – tblVWPTMaxAssays

<span style="color: #000000">This is for MDS v4.6.0 (or above)</span>

<span style="color: #000000">This hotfix enables modification on the element columns on tblVWPTMaxAssay view.</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix – tblDHGeotechRMR

<span style="color: #000000">This is for MDS v4.6.0</span>

<span style="color: #000000">This hotfix changes tblDHGeotechRMR.Structure_Count to allow null.</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix – tblSYSSurpacStyles

<span style="color: #000000">This is for MDS v4.6.0</span>

<span style="color: #000000">This hotfix changes tblSYSSurpacStyles.From_Value to allow null.</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix - Unlock element fields

<span style="color: #000000">This is for MDS v4.6.0</span>

<span style="color: #000000">This hotfix enables element columns on table/views to be modifiable.</span>


<span style="color: #000000">   tblAssayFlat</span>

<span style="color: #000000">   tblVWDHAssays</span>

<span style="color: #000000">   tblVWDHAssaysQC</span>

<span style="color: #000000">   tblVWDHMaxAssays</span>

<span style="color: #000000">   tblVWLSAssays</span>

<span style="color: #000000">   tblVWLSAssaysQC</span>

<span style="color: #000000">   tblVWLSMaxAssays</span>

<span style="color: #000000">   tblVWFSMaxAssays</span>

<span style="color: #000000">   tblVWPTAssays</span>

<span style="color: #000000">   tblVWPTAssaysQC</span>

<span style="color: #000000">   tblVWPTMaxAssays</span>

<span style="color: #000000">   tblVWStandardAssays</span>

<span style="color: #000000">   tblVWStandardAssaysQC</span>

<span style="color: #000000">   </span>

<span style="color: #000000">   (following views are for Production model only)</span>

<span style="color: #000000">   tblVWProdAssays</span>

<span style="color: #000000">   tblVWProdAssaysQC</span>

<span style="color: #000000">   tblVWFSAssays</span>

<span style="color: #000000">   tblVWFSAssaysQC</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix – tblLIBMagSusFactor

<span style="color: #000000">This is for MDS v4.6.0</span>

<span style="color: #000000">This hotfix addressed issue with invalid table reference in TR_utblLIBMagSusFactor_Multiplication_Factor.</span>

<span style="color: #000000">It also updates the AveReading trigger on MagSus tables to have a threshold of 10 instead of 1</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix - tblDHGeotech - Overlapping trigger

<span style="color: #000000">This is for MDS v4.6.0</span>

<span style="color: #000000">This hotfix patches your current MDS schema with enhanced TR_iutblDHGeotech_Interval_Overlap trigger on tblDHGeotech.</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix - tblStandardSamp & RecoveryPct_RQDPct triggers

<span style="color: #000000">This hotfix patches your current MDS schma with an enhanced TR_iutblStandardSamp_Source_ID trigger, and enhanced Recovery_pct/RQD_pct calculation triggers on tables tblDHCoreRecoveryRun / tblDHGeotechRMR / tblDHGeotechRQD as at 04 Aug 2014.</span>


<span style="color: #000000">It fixes invalid table reference in TR_iutblStandardSamp_Source_ID and addresses potential issue with handling manually calculated pct values when records are updated.</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix - Line up abbreviation code for Point tables to be PT

<span style="color: #000000">This is for MDS v4.6.0</span>

<span style="color: #000000">This hotfix line up the abbreviation code for Point tables to be PT as currently it has a mix of PT and PS.</span>



# > Macro (anchor)

MDS v4.6.0 Hotfix - XRF system

<span style="color: #000000">This is for MDS v4.6.0 (or above)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with enhanced XRF system objects as at 22 Aug 2014.</span>


<span style="color: #000000">This hotfix updates your current MDS schema with enhancements on the following objects:</span>

<span style="color: #000000">  -- tblSYSXRFIncomingData.UserDefined1 changed from NVARCHAR(20) TO NVARCHAR(256)</span>

<span style="color: #000000">  -- tblSYSXRFIncomingData.UserDefined2 changed from NVARCHAR(20) TO NVARCHAR(256)</span>

<span style="color: #000000">  -- Add new column tblSYSXRFIncomingData.UserDefined3 NVARCHAR(256)</span>

<span style="color: #000000">  -- Add new column tblSYSXRFIncomingData.UserDefined4 NVARCHAR(256)</span>

<span style="color: #000000">  -- Add new column tblSYSXRFIncomingData.UserDefined5 NVARCHAR(256)</span>

<span style="color: #000000">  -- Add new column tblSYSXRFIncomingData.UserDefined6 NVARCHAR(256)</span>

<span style="color: #000000">  -- Add new column tblSYSXRFIncomingData.Data_Source NVARCHAR(255)</span>

<span style="color: #000000">  -- tblXRFResults.UserDefined1 changed from NVARCHAR(20) TO NVARCHAR(256)</span>

<span style="color: #000000">  -- tblXRFResults.UserDefined2 changed from NVARCHAR(20) TO NVARCHAR(256)</span>

<span style="color: #000000">  -- Add new column tblXRFResults.UserDefined3 NVARCHAR(256)</span>

<span style="color: #000000">  -- Add new column tblXRFResults.UserDefined4 NVARCHAR(256)</span>

<span style="color: #000000">  -- Add new column tblXRFResults.UserDefined5 NVARCHAR(256)</span>

<span style="color: #000000">  -- Add new column tblXRFResults.UserDefined6 NVARCHAR(256)</span>

<span style="color: #000000">  -- Enhanced usp_ProcessXRFLabChecksInComingData to handle tblXRFDHSampQC table</span>


# > Macro (anchor)

~~MDS v4.6.0 Hotfix - RL - Dip columns 2 decimal points~~

~~<span style="color: #000000">This is for MDS v4.6.0</span>~~

~~<span style="color: #000000">This hotfix patches your current MDS schema with RL and Dip columns to be DECIMAL(18,2)</span>~~


~~<span style="color: #000000">For RL or *_RL columns on the following tables:</span>~~

~~<span style="color: #000000">   tblDHColl</span>~~

~~<span style="color: #000000">   tblDHCollHistory</span>~~

~~<span style="color: #000000">   tblDHCollPlanned</span>~~

~~<span style="color: #000000">   tblDHModelComposite</span>~~

~~<span style="color: #000000">   tblLSSite</span>~~

~~<span style="color: #000000">   tblLSSiteHistory</span>~~

~~<span style="color: #000000">   tblPTSite</span>~~

~~<span style="color: #000000">   tblPTSiteHistory</span>~~

~~<span style="color: #000000">   tblXRFSamp</span>~~

~~<span style="color: #000000">   (following tables on Production model)</span>~~

~~<span style="color: #000000">   tblProdBlasting</span>~~

~~<span style="color: #000000">   tblFSSite</span>~~

~~<span style="color: #000000">   tblFSSiteHistory</span>~~


~~<span style="color: #000000">For Dip or *_Dip columns on the following tables:</span>~~

~~<span style="color: #000000">   tblContractActivityLogMetres</span>~~

~~<span style="color: #000000">   tblDHCollPlanned</span>~~

~~<span style="color: #000000">   tblDHGeotech</span>~~

~~<span style="color: #000000">   tblDHStructure</span>~~

~~<span style="color: #000000">   tblDHStructureOrient</span>~~

~~<span style="color: #000000">   tblDHSurv</span>~~

~~<span style="color: #000000">   tblLSMapping</span>~~

~~<span style="color: #000000">   tblLSSurv</span>~~

~~<span style="color: #000000">   tblPTMapping</span>~~

~~<span style="color: #000000">   tblPTSite</span>~~

~~<span style="color: #000000">   tblXRFSamp</span>~~

~~<span style="color: #000000">   (following tables on Production model)</span>~~

~~<span style="color: #000000">   tblFSMapping</span>~~

~~<span style="color: #000000">   tblFSSurv</span>~~

~~<span style="color: #000000">   tblProdSlopeFailureDetails</span>~~

~~<span style="color: #000000">   tblProdSlopeHazardDetails</span>~~

~~<span style="color: #000000">   tblProdSlopeStructureDetails</span>~~


# > Macro (anchor)

MDS v4.6.0 Hotfix - Internal schema dictionary clean up

<span style="color: #000000">This is for MDS v4.6.0</span>

<span style="color: #000000">This hotfix clean up internal schema dictionary data to prevent false alerts.</span>


<span style="color: #000000">It removes reference to no longer existing objects:</span>

<span style="color: #000000">    TR_utblLIBGeologyLineationType</span>

<span style="color: #000000">    TR_utblLIBGeologyPlaneIntensity</span>

<span style="color: #000000">TR_utblLIBGeologyPlaneType</span>


<span style="color: #000000">and update correct datatype for:</span>

<span style="color: #000000">    tblLSSurv.Dip</span>

<span style="color: #000000">    tblPTGeology.Slope_Dip</span>

<span style="color: #000000">    tblDHSurv.Dip</span>

<span style="color: #000000">tblXRFSamp.Slope_Dip</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix – tblContractActivityLog.ActivityID column length

<span style="color: #000000">This is for MDS v4.6.0 (or above)</span>

<span style="color: #000000">This hotfix udpates ActivityID columns on contract activity related tables.</span>

<span style="color: #000000">This hotfix changes the following columns from NVARCHAR(20) to NVARCHAR(50):</span>

<span style="color: #000000">   tblContractActivityLog.ActivityID</span>

<span style="color: #000000">   tblContractActivityLogMetres.ActivityID</span>

<span style="color: #000000">   tblContractActivityLogDetails.ActivityID</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix - DH Overlapping trigger

<span style="color: #000000">This is for MDS v4.6.0 (or above)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with enhanced version of overlapping triggers on downhole tables.</span>

<span style="color: #000000">This hotfix updates following overlapping triggers to handle changes on priority column:</span>

<span style="color: #000000">   TR_iutblDHAlteration_Interval_Overlap</span>

<span style="color: #000000">   TR_iutblDHGeology_Interval_Overlap</span>

<span style="color: #000000">   TR_iutblDHLithology_Interval_Overlap</span>

<span style="color: #000000">   TR_iutblDHMinerals_Interval_Overlap</span>

<span style="color: #000000">   TR_iutblDHOxidation_Interval_Overlap</span>

<span style="color: #000000">   TR_iutblDHVeins_Interval_Overlap</span>

<span style="color: #000000">   TR_iutblDHWeathering_Interval_Overlap</span>


# > Macro (anchor)

> Macro (anchor)

MDS v4.6 Hotfix – tblProdMaterialMovement

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.1 with last patch date: 17/Feb/2015) (Production)</span>

<span style="color: #000000">This hotfix updates tblProdMaterialMovement table in your current MDS schema.</span>

<span style="color: #000000">   Update EquipmentID to NVARCHAR(25) NOT NULL</span>

<span style="color: #000000">   Update Contractor to NVARCHAR(25) NOT NULL</span>

<span style="color: #000000">   Add EquipmentID to be part of the primary key</span>


# > Macro (anchor)

MDS v4.6 Hotfix - tblLease Start_Date_End_Date check constraint

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.1 with last patch date: 17/Feb/2015)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of check constraint CK_tblLeases_Start_Date_End_Date on table tblLease.</span>


# > Macro (anchor)

MDS v4.5.2+ Hotfix - update triggers for DataSet SampleID

<span style="color: #000000">This is for MDS v4.5.2 (or above to 4.6.1 with last SP date: 17/Feb/2015)</span>

<span style="color: #000000">This hotfix enhances the triggers for updating Dataset/SampleID to handle when column updated but the value didn't actually change.</span>


<span style="color: #000000">This hotfix enhanced following triggers where applicable:</span>

<span style="color: #000000">	TR_utblDHMetSamp_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblDHMetSampQC_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblDHSamp_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblDHSampQC_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblLSMetSamp_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblLSMetSampQC_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblLSSamp_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblLSSampQC_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblPTMetSamp_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblPTMetSampQC_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblPTSamp_DataSet_SampleID	(tr_utblPointSamp_DataSet_SampleID or tr_utblSSamp_DataSet_SampleID in v4.5.2)</span>

<span style="color: #000000">	TR_utblPTSampQC_DataSet_SampleID	(tr_utblPointSampQC_DataSet_SampleID or tr_utblSSampQC_DataSet_SampleID in v4.5.2)</span>

<span style="color: #000000">	TR_utblStandardSamp_DataSet_SampleID	(tr_utblStandardSamples_DataSet_SampleID in v4.5.2)</span>

<span style="color: #000000">	TR_utblStandardSampQC_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblXRFDHSamp_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblXRFDHSampQC_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblXRFSamp_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblXRFSampQC_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblXRFStandardSamp_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblXRFStandardSampQC_DataSet_SampleID</span>


<span style="color: #000000">Following are for Production model:</span>

<span style="color: #000000">	TR_utblFSMetSamp_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblFSMetSampQC_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblFSSamp_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblFSSampQC_DataSet_SampleID</span>

<span style="color: #000000">	TR_utblProdSamp_LocationID_SampleID</span>

<span style="color: #000000">	TR_utblProdSampQC_LocationID_SampleID</span>



# MDS v4.5.2+ Hotfix - Load_Date-Loaded_By Audit Triggers

<span style="color: #000000">This is for MDS v4.5.2 (or above to 4.6.1 with last SP date: 17/Feb/2015)</span>

<span style="color: #000000">This hotfix updates the audit trigger for Load_Date/Loaded_By (or similar) columns with enhanced logic to act only if the value actually changed to work with other software functions.</span>


<span style="color: #000000">All base model tables with such trigger will be affected/updated. If there is any customisation on any of these trigger, the customisation will be dropped and needs to be manually added back afterwards.</span>

<span style="color: #000000">If the trigger on this schema has a different name than the one in our base model, it will not be updated and manual updates are required.</span>

<span style="color: #000000">Any similar trigger on custom table(s), if any, may also need to be reviewed and updated manually as appropriate.</span>


# > Macro (anchor)

> Macro (anchor)

MDS v4.6 Hotfix – tblStandardSamp

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.1 with last SP date: 17/Feb/2015) (Production)</span>

<span style="color: #000000">This hotfix updates TR_iutblStandardSamp_Source_ID to handle Prod standard samples</span>


# > Macro (anchor)

MDS v4.6.0 Hotfix - Lease_ID column length on related tables

<span style="color: #000000">This is for MDS v4.6.0 (or above)</span>

<span style="color: #000000">This hotfix updates lease/lease_ID columns on related tables.</span>

<span style="color: #000000">This hotfix changes the following columns from NVARCHAR(15) to NVARCHAR(50):</span>

<span style="color: #000000">   tblLeases.Lease_ID</span>

<span style="color: #000000">   tblDHColl.Lease_ID</span>

<span style="color: #000000">   tblFSSite.Lease_ID</span>

<span style="color: #000000">   tblLSSite.Lease_ID</span>

<span style="color: #000000">   tblPTSite.Lease_ID</span>

<span style="color: #000000">   tblSYSAssDispatchHeader.Lease_ID</span>

<span style="color: #000000">   tblCATReportIndex.Lease</span>

<span style="color: #000000">   tblCATPlanIndex.Lease</span>

<span style="color: #000000">   tblXRFSamp.Lease_ID</span>


# > Macro (anchor)

MDS v4.6.0+ Hotfix - Structure Orient calculation triggers

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.1 with last SP date: 17/Feb/2015)</span>

<span style="color: #000000">This hotfix update the structure orient calculation triggers.</span>

<span style="color: #000000">This hotfix update following structure orient calculation triggers with an enhanced version as at 9th Jun 2015:</span>

<span style="color: #000000">   TR_iutblDHStructureOrient_Alpha_Beta_Gamma_Calculate</span>

<span style="color: #000000">   TR_iutblDHSurv_Dip_MAG_Azimuth_Depth_Priority_Calculate</span>


# > Macro (anchor)

MDS v4.6 Hotfix - Azimuth - RL - Z - Dip columns decimal points

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 17/Feb/2015)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with RL, Z and Azimuth columns to be DECIMAL(18,4), and updates related functions/SP to reflect the column change.</span>

<span style="color: #000000">For v4.6.0, it also updates the Dip columns to be DECIMAL(18,2).</span>


<span style="color: #000000">For RL or *_RL columns on the following tables:</span>

<span style="color: #000000">   tblDHColl</span>

<span style="color: #000000">   tblDHCollHistory</span>

<span style="color: #000000">   tblDHCollPlanned</span>

<span style="color: #000000">   tblDHModelComposite</span>

<span style="color: #000000">   tblLSSite</span>

<span style="color: #000000">   tblLSSiteHistory</span>

<span style="color: #000000">   tblPTSite</span>

<span style="color: #000000">   tblPTSiteHistory</span>

<span style="color: #000000">   tblXRFSamp</span>

<span style="color: #000000">   (following tables on Production model)</span>

<span style="color: #000000">   tblProdBlasting</span>

<span style="color: #000000">   tblFSSite</span>

<span style="color: #000000">   tblFSSiteHistory</span>


<span style="color: #000000">For Z columns on the following tables:</span>

<span style="color: #000000">   tblDHGeology</span>

<span style="color: #000000">   tblDHIntercepts</span>

<span style="color: #000000">   tblDHLithology</span>

<span style="color: #000000">   tblDHRadiometrics</span>

<span style="color: #000000">   tblDHSamp</span>

<span style="color: #000000">   tblDHSurv</span>

<span style="color: #000000">   tblLSGeology</span>

<span style="color: #000000">   tblLSSamp</span>

<span style="color: #000000">   tblLSSurv</span>

<span style="color: #000000">   tblXRFDHSamp</span>

<span style="color: #000000">   (following tables on Production model)</span>

<span style="color: #000000">   tblFSGeology</span>

<span style="color: #000000">   tblFSSamp</span>

<span style="color: #000000">   tblFSSurv</span>


<span style="color: #000000">For Azimuth or *_Azimuth columns on the following tables:</span>

<span style="color: #000000">   tblContractActivityLogMetres</span>

<span style="color: #000000">   tblDHCollPlanned</span>

<span style="color: #000000">   tblDHStructure</span>

<span style="color: #000000">   tblDHStructureOrient</span>

<span style="color: #000000">   tblDHSurv</span>

<span style="color: #000000">   tblLSSurv</span>

<span style="color: #000000">   (following tables on Production model)</span>

<span style="color: #000000">   tblFSSurv</span>

<span style="color: #000000">   tblProdSlopeFailureDetails</span>

<span style="color: #000000">   tblProdSlopeHazardDetails</span>

<span style="color: #000000">   tblProdSlopeStructureDetails</span>


<span style="color: #000000">Updated following functions/SP to reflect the above column changes:</span>

<span style="color: #000000">   udf_CheckAzimuthDeviation</span>

<span style="color: #000000">   udf_DistanceWAveDipAzi</span>

<span style="color: #000000">   udf_OrientDipAzi</span>

<span style="color: #000000">   udf_OrientDipDirection</span>

<span style="color: #000000">   usp_DataStructOrientDriver</span>


<span style="color: #000000">For Dip or *_Dip columns on the following tables: (for v4.6.0 only)</span>

<span style="color: #000000">   tblContractActivityLogMetres</span>

<span style="color: #000000">   tblDHCollPlanned</span>

<span style="color: #000000">   tblDHGeotech</span>

<span style="color: #000000">   tblDHStructure</span>

<span style="color: #000000">   tblDHStructureOrient</span>

<span style="color: #000000">   tblDHSurv</span>

<span style="color: #000000">   tblLSMapping</span>

<span style="color: #000000">   tblLSSurv</span>

<span style="color: #000000">   tblPTMapping</span>

<span style="color: #000000">   tblPTSite</span>

<span style="color: #000000">   tblXRFSamp</span>

<span style="color: #000000">   (following tables on Production model)</span>

<span style="color: #000000">   tblFSMapping</span>

<span style="color: #000000">   tblFSSurv</span>

<span style="color: #000000">   tblProdSlopeFailureDetails</span>

<span style="color: #000000">   tblProdSlopeHazardDetails</span>

<span style="color: #000000">   tblProdSlopeStructureDetails</span>


# > Macro (anchor)

MDS v4.6.0 HotFix - Add Zn onto XRF Views

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 31/Jul/2015)</span>

<span style="color: #000000">This hotfix addes Zn element onto tblVWXRFDHResults/tblVWXRFIncomingResults/tblVWXRFResults views.</span>


# > Macro (anchor)

> Macro (anchor)

MDS v4.6 HotFix - Unlock triggers on views

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 31/Jul/2015)</span>

<span style="color: #000000">This hotfix unlocks triggers on all views so triggers can be modified to reflect view changes.</span>


# > Macro (anchor)

MDS v4.6 HotFix - XRF Sample table Sample_Type trigger

This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 07/Jun/2016)

This hotfix patches your current MDS schema with enhancements on the following triggers to handle NULL Sample_Type:

    TR_iutblXRFDHSamp_Sample_Type

    TR_iutblXRFDHSampQC_Sample_Type

    TR_iutblXRFSamp_Sample_Type

    TR_iutblXRFSampQC_Sample_Type

# > Macro (anchor)



# > Macro (anchor)

MDS v4.6 HotFix - Geology table Alt_Min_Vein_Code check constraint

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 07/Jun/2016)</span>

<span style="color: #000000">This hotfix enhanced following check constraint for Alt/Min/Vein_Code on tblDH/FS/LSGeology tables:</span>

<span style="color: #000000">   CK_tblDHGeology_Alt2_Code</span>

<span style="color: #000000">   CK_tblDHGeology_Min2_Code</span>

<span style="color: #000000">   CK_tblDHGeology_Vein2_Code</span>

<span style="color: #000000">   CK_tblFSGeology_Alt2_Code</span>

<span style="color: #000000">   CK_tblFSGeology_Min2_Code</span>

<span style="color: #000000">   CK_tblFSGeology_Vein2_Code</span>

<span style="color: #000000">   CK_tblLSGeology_Alt2_Code</span>

<span style="color: #000000">   CK_tblLSGeology_Min2_Code</span>

<span style="color: #000000">   CK_tblLSGeology_Vein2_Code</span>


# > Macro (anchor)

MDS v4.6 HotFix – tblSYSConversionFactor

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 07/Jun/2016)</span>

<span style="color: #000000">This hotfix changes tblSYSConversionFactor.ConversionFactor from DECIMAL(20,9) TO DECIMAL(28,10) and update conversion factor for code PPT to % to be 0.0000000001</span>


# > Macro (anchor)

> Macro (anchor)

MDS v4.6 HotFix - tblDHGeotechRMR.Relative_Block_Size

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 07/Jun/2016)</span>

<span style="color: #000000">This hotfix enhanced the calculation formula for tblDHGeotechRMR.Relative_Block_Size to handle when Jn=0 set the result to 0.</span>


# > Macro (anchor)

> Macro (anchor)

MDS v4.6 HotFix - tblDHColl Max_Depth trigger

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.3 with last SP date: 01/Aug/2017)</span>

<span style="color: #000000">This hotfix updates the trigger TR_utblDHColl_Max_Depth for better performance</span>




  


# > Macro (anchor)

Enhanced functions, stored procedures


# > Macro (anchor)

MDS Hotfix - usp_AdminCleanUpDataShedObjects9Apr2014

This tool patches your current MDS schema with an enhanced version of usp_AdminCleanUpDataShedObjects stored procedure as at 9 Apr 2014!


# > Macro (anchor)

~~MDS v4.6.0 Hotfix - ProcessIncomingDataDriver22May2014~~

~~<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of usp_ProcessIncomingDataDriver stored procedure as at 22 May 2014!</span>~~


# > Macro (anchor)

MDS v4.6.0 Hotfix - usp_DataStructOrientDriver19Jun2014

<span style="color: #000000">This hotfix fix patches your current MDS schma with an enhanced usp_DataStructOrientDriver as at 19 Jun 2014.</span>


# > Macro (anchor)

~~MDS v4.6.0 Hotfix - usp_ProcessCombineMultipleTableColumns31Jul2014~~

~~<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of the usp_ProcessCombineMultipleTableColumns stored procedure as at 31/Jul/2014!</span>~~



# > Macro (anchor)

~~MDS v4.6.0 Hotfix - usp_DataDesurvey~~

~~<span style="color: #000000">This is for MDS v4.6.0</span>~~

~~<span style="color: #000000">This hotfix patches your current MDS schema with enhanced usp_Desurvey stored procedure.</span>~~



# > Macro (anchor)

~~MDS v4.6.0 Hotfix - AssayMerging15Sep2014~~

~~<span style="color: #000000">This is for MDS v4.6.0</span>~~

~~<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of Assay Merging stored procedure as at 15 Sep 2014!</span>~~



# > Macro (anchor)

MDS v4.6 Hotfix - usp_DataAssayRankingProcess 17Dec2014

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.1)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of usp_DataAssayRankingProcess stored procedure as at 17th Dec 2014!</span>


# > Macro (anchor)

MDS Modifier - usp_AdminDataDictionary

<span style="color: #000000">This is for MDS v4.5.0 (or above to 4.6.1 with last patch date: 17/Feb/2015)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of the usp_AdminDataDictionary stored procedure as at 27 Feb 2015!</span>

<span style="color: #000000">   Added col_decimal to report decimal points used.</span>



# > Macro (anchor)

~~MDS v4.6 Hotfix - usp_ProcessIncomingDataDriver~~

~~<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 31/Jul/2015)</span>~~

~~<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of usp_ProcessIncomingDataDriver stored procedure as at 29th Jan 2016!</span>~~

~~<span style="color: #000000">It also patches your current MDS schema with enhanced versions of some Sample QC table triggers.</span>~~

~~<span style="color: #000000">Following Sample QC table triggers, where applicable, will be updated:</span>~~

~~<span style="color: #000000">   TR_iutblLSMetSampQC_DataSet_Orig_SampleID_SampleID</span>~~

~~<span style="color: #000000">   TR_iutblLSSampQC_DataSet_Orig_SampleID_SampleID</span>~~

~~<span style="color: #000000">   TR_iutblPTMetSampQC_DataSet_Orig_SampleID_SampleID</span>~~

~~<span style="color: #000000">   TR_iutblPTSampQC_DataSet_Orig_SampleID_SampleID</span>~~

~~<span style="color: #000000">   TR_iutblFSSampQC_DataSet_Orig_SampleID_SampleID</span>~~



# > Macro (anchor)

~~MDS v4.5+ Hotfix - usp_DataAssayMergingProcess14Jul2015~~

~~<span style="color: #000000">This is for MDS v4.5.0 (or above to 4.6.1 with last SP date: 17/Feb/2015)</span>~~

~~<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of usp_DataAssayMergingProcess (and usp_DataXRFResultsMergingProcess where applicable) stored procedure as at 14th Jul 2015!</span>~~


# > Macro (anchor)

MDS v4.6.0 HotFix - Assay Management SPs

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 31/Jul/2015)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of assay management stored procedures as at 4th Jan 2017!</span>


<span style="color: #000000">It patches following stored procedures:</span>

<span style="color: #000000">    usp_DataAssayMergingProcess</span>

<span style="color: #000000">    usp_ProcessInComingDataDriver</span>

<span style="color: #000000">    usp_ProcessLabChecksInComingData</span>

<span style="color: #000000">    usp_ProcessStandardsInComingData</span>


<span style="color: #000000">    usp_DataXRFResultsMergingProcess</span>

<span style="color: #000000">    usp_ProcessXRFInComingDataDriver</span>

<span style="color: #000000">    usp_ProcessXRFLabChecksInComingData</span>

<span style="color: #000000">    usp_ProcessXRFStandardsInComingData</span>


# > Macro (anchor)

~~MDS v4.6 HotFix - usp_ProcessCombineMultipleTableColumns26Feb2016~~

~~<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 31/Jul/2015)</span>~~

~~<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of the usp_ProcessCombineMultipleTableColumns stored procedure as at 26/Feb/2016!</span>~~


# > Macro (anchor)

> Macro (anchor)

> Macro (anchor)

MDS v4.6 HotFix - Data Desurvey

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 07/Jun/2016)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of Desurvey packages as at 27</span><sup><span style="color: #000000">th</span></sup><span style="color: #000000"> Sep 2016!</span>


# > Macro (anchor)

MDS v4.6 HotFix - usp_DataTestAssayFlatPopulated28Oct2016

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 07/Jun/2016)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of usp_DataTestAssayFlatPopulated stored procedure as at 28th Oct 2016!</span>


# > Macro (anchor)

MDS v4.6 Hotfix - Prod Location Balance29Nov2016

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 07/Jun/2016) (Production)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with following fixes:</span>

<span style="color: #000000">It has an enhanced version of usp_PopulateProdLocationBalance stored procedure as at 29/Nov/2016</span>

<span style="color: #000000">It has an enhanced version of utf_ProdLocationDailyBalance function as at 18/Nov/2016.</span>

<span style="color: #000000">It updated the calculation formula for tblProdMaterialMovement.Tonnage_Calculated.</span>

<span style="color: #000000">It added two new views: tblVWProdLocationTrucking & tblVWProdLocationBalanceVolume</span>



<span style="color: #000000">Enhancement in usp_PopulateProdLocationBalance stored procedure:</span>

<span style="color: #000000">  It added more validation checks on number of commodities between block and locations to ensure correct calculation</span>


<span style="color: #000000">Enhancement in utf_ProdLocationDailyBalance function:</span>

<span style="color: #000000">  It fixed SG issue when unit is already tone.</span>

<span style="color: #000000">  When previous day balance grade is 0, it will use current day overall move in grade for move out.</span>

<span style="color: #000000">  Enhanced logic to use the average grade of the previous day balance and current day trucking/move in as the move out grade for the day.</span>

<span style="color: #000000">  Enhanced logic to prevent double calculation some values when there are multiple move ins.</span>


<span style="color: #000000">tblProdMaterialMovement.Tonnage_Calculated calculation formula now is:</span>

<span style="color: #000000">  (CONVERT([decimal](18,3),(CASE WHEN Movement_Unit = 'T' THEN 1 ELSE [Movement_SG] END * [Movement_Value]) * [Movement_Unit_factor],(0)))</span>


<span style="color: #000000">Balance calculation formula:</span>

<span style="color: #000000">  BalanceAmount = PrevA + TruckA + MoveInA - MoveOutA</span>

<span style="color: #000000">  BalanceGrade = (PrevA*PrevG + TruckA*TruckG + MoveInA*MoveInG - MoveOutA*MoveOutG)/(PrevA + TruckA + MoveInA - MoveOutA)</span>


<span style="color: #000000">  PrevA: If survey is done on start of the day and there is a survey then using survey amount, otherwise, using previous day balance amount</span>

<span style="color: #000000">  PrevG: If survey is done on start of the day and there is a survey then using survey grade, otherwise, using previous day balance grade</span>

<span style="color: #000000">  TruckA: Trucking amount of the day</span>

<span style="color: #000000">  TruckG: Trucking grade of the day (weighted)</span>

<span style="color: #000000">  MoveInA: Move in amount of the day</span>

<span style="color: #000000">  MoveInG: Move in grade of the day (weighted). For each move in, the grade is using the previous day balance grade of the source location.</span>

<span style="color: #000000">  MoveOutA: Move out amount of the day</span>

<span style="color: #000000">  MoveOutG: If survey is done on start of the day and there is a survey then using weighted (Survey+Trucking+MoveIn) grade, otherwise using weighted (Prev+Trucking+MoveIn) grade</span>


# > Macro (anchor)

MDS 4.6 HotFix - udf_OrientDipDirection29Mar2017

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 07/Jun/2016)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of udf_OrientDipDirection function as at 29th Mar 2017!</span>


# > Macro (anchor)

MDS v4.6 HotFix - usp_ProcessCombineMultipleTableColumns30Jun2017

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.2 with last SP date: 07/Jun/2016)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of the usp_ProcessCombineMultipleTableColumns stored procedure as at 30/Jun/2017!</span>


# > Macro (anchor)

MDS v4.6 HotFix - usp_DataAssayRanking

<span style="color: #000000">This is for MDS v4.6.0 (or above to 4.6.3 with last SP date: 01/Aug/2017)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of usp_DataAssayRankingProcess stored procedure as at 13th Mar 2018!</span>