TECHNICAL ARTICLE: howto_014.htm

 Close Window  

 
 


Title:
HOW TO:  Locate Vehicles without a Template Assignment


Overview:
There may be times when you need to know of any vehicles that do not have a Template assigned, particularly with large fleets. This document explains how to find those vehicles in your database.
 
Procedure:
Start FLEETMATE to access your existing database. Use the File | Database | Issue SQL Statement... menu option to open the Issue SQL Statement dialog. Copy and paste the SQL Statement below into the center pane of the Issue SQL Statement dialog. Make sure that the Query Type is set to Select, and click the Execute button for your results.
 

SQL Statement
SELECT Vehicle.TX_VEHNUMBER, Vehicle.TX_VIN FROM Vehicle LEFT JOIN RecurringMaint ON Vehicle.TX_VIN = RecurringMaint.TX_VIN WHERE ((((SELECT DISTINCT RecurringMaint.TX_VIN FROM RecurringMaint WHERE (((RecurringMaint.NO_TEMPLATE)>0 AND RecurringMaint.TX_VIN=Vehicle.TX_VIN)))) Is Null)) AND Vehicle.DT_RETIRED IS NULL ORDER BY Vehicle.TX_VEHNUMBER

 
Results:
For each non-retired vehicle where no Template has been assigned, you will see the Veh No and the VIN, as illustrated in the Sample below. You can copy/paste the results into another application, such as NotePad so that you can print the results.  
 
In the Sample Results below, there are two vehicle records that have no Template assignment. The Veh No and the VIN are returned.

Sample Results
Query Start - 09/22/2011 2:49:51 PM
Rec:0000001 - 12345 67890123456789012
Rec:0000002 - 555-6 34567890123456789
Query End - 09/22/2011 2:49:52 PM

 



If you need additional assistance, please write or call us:
 support@FLEETMATE.com 
410-282-3603


FLEETMATE Software Copyright (c) 2005-2013 by SCB Consulting.  All rights reserved.
FLEETMATE is a registered trademark of SCB Consulting, LLC.