Towards the end of last year, i hooked up with a friend for a casual talk and to wish him good luck for the new year, he was handling the logistics operation of an equipment manufacturer. During the course of discussion, he mentioned that he was using access as a tool to track all his consignments or say logistics details of all the equipment’s that are being shipped to customers from their respective depots/warehouses and that they had a contract with all the transporters on the SLA (TAT) Service Level agreement on time required for delivery from one City to another City. He had to track and report the time taken for delivery from one City to another city, which would help him track slip up/inefficiencies by the transporter on the delivery of the equipment’s.
In this example i would be guiding as to how to use access for determining the agreed and the actual SLA for every shipment that has been moved from depots of various city.
As usual, we require a “Master Table” to capture the agreed SLA (Agreed time of deliveries between cities) between the manufacturer and the transporter and a “Transaction Table” that captures the actual transaction details such as pick up date, Pick up City, Destination City etc (For the ease of purpose i am considering only transport by Road).
The master table is named as “SLA_TAT_Master” and the transaction table as “Shipment_Data“. Both tables are to be normalized as much as possible.
Both the tables are related to each using the PIN code column in both the table. The data Type of the PIN code column is to be set as Short Text, by default access would define them as Short number.
The agreed SLA between two cities for all shipment data or for a given criteria can be viewed using a select Query.
The data has been imported from MS Excel in MS Access using one of the methods mentioned in the previous posts.
Follow the process to create the select Query to view the agreed SLA without updating the Shipment_Data table (Transaction Table).
- Open MS access.
- Import the data (Both Tables) if not present. (No Need to import if you are using MS access to track the details).
- Ensure the data type is same that will be used for the columns to set the relationship between the two tables.
- Create a new Query using the “Query Design” option and select the “Select” Mode.
- Set relation between the two tables on the columns “Pickup_PIN” and “Destination_PIN” columns of both the tables.
- Select the required columns (of your Choice) from the shipment Data Table, select the “SLA_TAT” from the master table at the end to get the agreed SLA.
- Save the Query with the name “View_SLA_Query“.
- Run the Query “View_SLA_Query” to view the results.
Follow the Process to create a query to update the SLA from the master table in the Shipment_Data Table against each Shipment or record, which is not updated previously.
- Open MS access.
- Import the data (Both Tables) if not present. (No Need to import if you are using MS access to track the details).
- Ensure the data type is same that will be used for the columns to set the relationship between the two tables.
- Create a new Query using the “Query Design” option and select the “Select” Mode
- Set relation between the two tables on the columns “Pickup_PIN” and “Destination_PIN” columns of both the tables.
- Select the column TAT_SLA (twice) from the shipment Data Table in the bottom grid, Type the text “[SLA_TAT_Master].[SLA_TAT]” in the update to Row in the bottom grid to get the value from the master table. Note – The syntax to update values from other Tables is [Tablename].[Column name] i.e [SLA_TAT_Master].[SLA_TAT].
- Set the criteria row of the second “TAT_SLA” column to Null. The Null criteria ensures that only those records are updated which have not been updated, else the query will update all the records in the shipment data table which have been updated previously.
- Save the Query with the name “Update_SLA_Query“.
- Run the Query “Update_SLA_Query” to update the records either by double clicking the query or by pressing the Entering key on selecting the key.
- Open the Shipment Data Table to view the update in the TAT_SLA column.
Pasted below is the link of the URL of the You tube Video that will help you understand the Select Query.
Pasted below is the link of the URL of the You tube Video that will help you understand the update Query for updating the SLA in the shipment data table.
Your Suggestions/Feedback are Welcome.