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

> Macro (toc)


  


# > Macro (anchor)

MDS v4.6.2 SP1 HotFix -01_tblContractActivityLog

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

<span style="color: #000000">This hotfix patches your current MDS schema with enhancements on tblContractActivityLog</span>

<span style="color: #000000">tblContractActivityLog.Comments length changed from 2000 to 4000</span>


# > Macro (anchor)

> Macro (anchor)

MDS v4.6.2 HotFix – tblLIBMagSusFactor

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

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of trigger TR_iutblLIBMagSusFactor_Multiplication_Factor on table tblLIBMagSusFactor as at 28 Jul 2016</span>


# > Macro (anchor)

MDS v4.6.2 HotFix - tblProdBlockResource

<span style="color: #000000">This is for MDS v4.6.2 (Production)</span>

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of trigger TR_dtblProdBlockResource_BlockRegister on table tblProdBlockResource as at 3rd Aug 2016</span>


# > Macro (anchor)

MDS v4.6.2SP1 HotFix -08_tblVWPTLogging

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

<span style="color: #000000">This hotfix enhanced the tblVWPTLogging triggers</span>


# > Macro (anchor)

MDS v4.6.2 SP1 HotFix –11_tblAssay

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

<span style="color: #000000">This hotfix patches your current MDS schema on tblAssay table with following triggers as at 4th Jan 2017:</span>

<span style="color: #000000">   Removed trigger TR_utblAssay_AssayResultNum_UnitCode_LimitLower_sysAssayStatus_Element_Repeat_Preferred</span>

<span style="color: #000000">   New trigger TR_utblAssay_AssayResultNum_UnitCode_LimitLower_sysAssayStatus_Element</span>


# > Macro (anchor)

MDS v4.6.2SP1 HotFix -13_Extension_SQL_Statements

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

<span style="color: #000000">This hotfix updates the base Extension SQL Statements</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)

MDS v4.6.2 SP1 HotFix -16_Depth column on DHGeophysics tables

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

<span style="color: #000000">This hotfix enhanced DH Geophysics instrument tables with Depth column changed from DECIMAL(18,2) to DECIMAL(18,3) on the following tables:</span>

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

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

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

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

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


# > 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)

> 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)

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)

MDS v4.6 HotFix -Client_Validated_Reset trigger on tblContractActivityLog tables

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

<span style="color: #000000">This hotfix enhanced the Client_Validated_Reset triggers on tblContractActivityLog* tables to better handle change of PK values.</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)

MDS v4.6.2+ HotFix – tblVWProdTruckingRpt

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

<span style="color: #000000">This hotfix fixes Ounces calculation formula in tblVWProdTruckingRpt and associated extension SQL statements</span>



  


# > Macro (anchor)

Enhanced functions, stored procedures

# > 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 - Assay Management SPs

This is for MDS v4.6.0 (or above to 4.6.2)

This hotfix patches your current MDS schema with an enhanced version of assay management stored procedures as at 4th Jan 2017!


It patches following stored procedures:

    usp_DataAssayMergingProcess

    usp_ProcessInComingDataDriver

    usp_ProcessLabChecksInComingData

    usp_ProcessStandardsInComingData


    usp_DataXRFResultsMergingProcess

    usp_ProcessXRFInComingDataDriver

    usp_ProcessXRFLabChecksInComingData

    usp_ProcessXRFStandardsInComingData



# > Macro (anchor)

> Macro (anchor)

MDS v4.6.2 HotFix - usp_TableReferenceLevel15Dec2016

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

<span style="color: #000000">This hotfix patches your current MDS schema with an enhanced version of usp_TableReferenceLevel as at 15th Dec 2016!</span>


# > Macro (anchor)

> 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)

> Macro (anchor)

MDS v4.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)

> 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>