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

> Macro (toc)


  


# > Macro (anchor)

~~MDS 4.6 HotFix LIB table default data~~

~~<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 updates all base LIB tables with the base data where applicable.</span>~~


# > Macro (anchor)

MDS 4.6 HotFix ProdSamp DSConfig setting

<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 adds the DSConfig settings for ProdSamp/ProdSampQC if not already exist.</span>


# > Macro (anchor)

MDS 4.6.2 HotFix tblVWPTLogging

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

<span style="color: #000000">This hotfix updates TR_utblVWPTLogging trigger on tblVWPTLogging view as at 9th Feb 2016.</span>


# > Macro (anchor)

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

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 4.6.1+ HotFix – tblProdBottleRollResults

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

<span style="color: #000000">This hotfix changes Measured_SG column on tblProdBottleRollResults to allow NULL value.</span>


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

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

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)

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

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

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