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

> Macro (toc)


  


# > Macro (anchor)

MDS v4.6.1 Hotfix - Special CU for DB deployed before 19th Dec 2014

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

<span style="color: #000000">This hotfix patches earlier deployments of v4.6.1 with additional required enhancements.</span>

<span style="color: #000000">--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>

<span style="color: #000000">--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>

<span style="color: #000000">--Added Local_Survey_Method, Local_Survey_By, Local_Survey_Date on tblXRFSamp</span>

<span style="color: #000000">--Renamed Date_Measured to Measured_Date on the following tables</span>

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

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

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

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

<span style="color: #000000">--Removed following constraints</span>

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

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

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

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

<span style="color: #000000">--Enhanced version of trigger TR_iutblSYSIncomingDataMasks_Identifier</span>

<span style="color: #000000">--New usp_DSGetColumnScale</span>


<span style="color: #000000">Following changes are applicable to Production model only.</span>

<span style="color: #000000">--Added Date_Started, Date_Complted columns on tblFSMetaData</span>

<span style="color: #000000">--Removed Mapped_Date, Mapped_By columns and related constraints from tblFSMetaData</span>

<span style="color: #000000">--An enhanced version of utf_ProdReporting</span>

<span style="color: #000000">--New usp_ProdLocationBalanceReportingTroubleshooter to help with troubleshooting reporting issues</span>


# > 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.1 Hotfix - Populate MDS.tblSYSNums data

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

<span style="color: #000000">This hotfix populates MDS.tblSYSNums with required data.</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>


# > Macro (anchor)

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)

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.1 Hotfix - QAQC DBVersion value

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

<span style="color: #000000">This hotfix update the QAQC DBVersion number in tblSYSParam to v2.5.1 where it sees as appropriate.</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.1 Hotfix - PT Samp logging view trigger

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

<span style="color: #000000">This hotfix patches your current MDS schema with enhanced triggers for point sample logging views as at 9 Jan 2015.</span>

<span style="color: #000000">This hotfix fixes filters for populating tblPTGeology table on following triggers:</span>

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

<span style="color: #000000">     TR_itblVWPTSampLogging</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.1 with last patch 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 4.6.1 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>~~



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

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


# MDS v4.6 Hotfix - usp_ProcessIncomingDataDriver29Jan2016

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

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)

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