<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://in.compucrete.com/index.php?action=history&amp;feed=atom&amp;title=GPS_Report_Queries</id>
	<title>GPS Report Queries - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://in.compucrete.com/index.php?action=history&amp;feed=atom&amp;title=GPS_Report_Queries"/>
	<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=GPS_Report_Queries&amp;action=history"/>
	<updated>2026-05-15T19:30:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://in.compucrete.com/index.php?title=GPS_Report_Queries&amp;diff=230&amp;oldid=prev</id>
		<title>WikiAdmin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=GPS_Report_Queries&amp;diff=230&amp;oldid=prev"/>
		<updated>2023-07-14T12:58:50Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:58, 14 July 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>WikiAdmin</name></author>
	</entry>
	<entry>
		<id>http://in.compucrete.com/index.php?title=GPS_Report_Queries&amp;diff=229&amp;oldid=prev</id>
		<title>Chanson at 21:51, 13 January 2022</title>
		<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=GPS_Report_Queries&amp;diff=229&amp;oldid=prev"/>
		<updated>2022-01-13T21:51:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== GPTSTATUS ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PRE&amp;gt;select * from gptstatus&lt;br /&gt;
where truck_no='74' order by seq_no desc&lt;br /&gt;
rows 1 to 100&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GPS with description:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
select gps.truck_no , status_datetime,&lt;br /&gt;
case status_col&lt;br /&gt;
when 0 then 'Unknown'&lt;br /&gt;
when 1 then 'Beg Load'&lt;br /&gt;
when 2 then 'End Load'&lt;br /&gt;
when 3 then 'To Job'&lt;br /&gt;
when 4 then 'On Job'&lt;br /&gt;
when 5 then 'Beg Pour'&lt;br /&gt;
when 6 then 'End Pour'&lt;br /&gt;
when 7 then 'Returning'&lt;br /&gt;
when 8 then 'At Plant'&lt;br /&gt;
when 9 then 'In Serv'&lt;br /&gt;
when 10 then 'Out of Serv'&lt;br /&gt;
when 11 then 'Trk Clock In'&lt;br /&gt;
when 12 then 'Trk Clock Out'&lt;br /&gt;
when 13 then 'Travel'&lt;br /&gt;
when 14 then 'Pre-Ticket'&lt;br /&gt;
when 15 then 'Drv Clock In'&lt;br /&gt;
when 16 then 'Drv Clock Out'&lt;br /&gt;
end,&lt;br /&gt;
case status_reason&lt;br /&gt;
when 0 then 'GPS Data'&lt;br /&gt;
when 1 then 'Manual Status'&lt;br /&gt;
when 2 then ' Auto Status'&lt;br /&gt;
when 3 then 'On-job based on stop time'&lt;br /&gt;
when 4 then 'On-job based on button'&lt;br /&gt;
when 5 then 'Loaded based on batch results received'&lt;br /&gt;
when 6 then 'Pre-ticketed load released'&lt;br /&gt;
when 7 then 'Geofence entered/exited'&lt;br /&gt;
else '???' end Reason&lt;br /&gt;
,gps.*&lt;br /&gt;
from gptstatus gps &lt;br /&gt;
where gps.status_datetime between :&amp;quot;Begin&amp;quot; and :&amp;quot;End&amp;quot;&lt;br /&gt;
-- and gps.truck_no = '105' &lt;br /&gt;
and status_col ^= 13&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GPS with Ticket Info&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
select gps.truck_no gpstrk,pth.truck_no ptk_trk, status_datetime,&lt;br /&gt;
case status_col&lt;br /&gt;
when 0 then 'Unknown'&lt;br /&gt;
when 1 then 'Beg Load'&lt;br /&gt;
when 2 then 'End Load'&lt;br /&gt;
when 3 then 'To Job'&lt;br /&gt;
when 4 then 'On Job'&lt;br /&gt;
when 5 then 'Beg Pour'&lt;br /&gt;
when 6 then 'End Pour'&lt;br /&gt;
when 7 then 'Returning'&lt;br /&gt;
when 8 then 'At Plant'&lt;br /&gt;
when 9 then 'In Serv'&lt;br /&gt;
when 10 then 'Out of Serv'&lt;br /&gt;
when 11 then 'Trk Clock In'&lt;br /&gt;
when 12 then 'Trk Clock Out'&lt;br /&gt;
when 13 then 'Travel'&lt;br /&gt;
when 14 then 'Pre-Ticket'&lt;br /&gt;
when 15 then 'Drv Clock In'&lt;br /&gt;
when 16 then 'Drv Clock Out'&lt;br /&gt;
end,&lt;br /&gt;
case status_reason&lt;br /&gt;
when 0 then 'GPS Data'&lt;br /&gt;
when 1 then 'Manual Status'&lt;br /&gt;
when 2 then ' Auto Status'&lt;br /&gt;
when 3 then 'On-job based on stop time'&lt;br /&gt;
when 4 then 'On-job based on button'&lt;br /&gt;
when 5 then 'Loaded based on batch results received'&lt;br /&gt;
when 6 then 'Pre-ticketed load released'&lt;br /&gt;
when 7 then 'Geofence entered/exited'&lt;br /&gt;
else '???' end Reason,pth.cust_no,pth.ticket_no&lt;br /&gt;
,gps.*&lt;br /&gt;
from gptstatus gps &lt;br /&gt;
left outer join artptkhd pth on pth.order_session_no=gps.order_session_no and pth.order_trans_no=gps.order_trans_no and gps.load_no=pth.order_load_no&lt;br /&gt;
where gps.status_datetime between :&amp;quot;Begin&amp;quot; and :&amp;quot;End&amp;quot;&lt;br /&gt;
-- and gps.truck_no = '105' &lt;br /&gt;
and status_col ^= 13&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
STATUS_COL values:&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1 Begin Load &amp;lt;BR&amp;gt;&lt;br /&gt;
2 End Load&amp;lt;BR&amp;gt;&lt;br /&gt;
3 Leave Plant&amp;lt;BR&amp;gt;&lt;br /&gt;
4 Arrive Job&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Begin Pour&amp;lt;BR&amp;gt;&lt;br /&gt;
6 End Pour&amp;lt;BR&amp;gt;&lt;br /&gt;
7 Leave Job&amp;lt;BR&amp;gt;&lt;br /&gt;
8 Arrive Plant&amp;lt;BR&amp;gt;&lt;br /&gt;
9 In Service&amp;lt;BR&amp;gt;&lt;br /&gt;
10 Out of Service&amp;lt;BR&amp;gt;&lt;br /&gt;
11 Clock In&amp;lt;BR&amp;gt;&lt;br /&gt;
12 Clock Out&amp;lt;BR&amp;gt;&lt;br /&gt;
13 GPS Data&amp;lt;BR&amp;gt;&lt;br /&gt;
14 Pre-Ticket&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
STATUS_REASON values:&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
0 GPS Data&amp;lt;BR&amp;gt;&lt;br /&gt;
1 Manual Status&amp;lt;BR&amp;gt;&lt;br /&gt;
2 Auto Status&amp;lt;BR&amp;gt;&lt;br /&gt;
3 On-job based on stop time&amp;lt;BR&amp;gt;&lt;br /&gt;
4 On-job based on button&amp;lt;BR&amp;gt;&lt;br /&gt;
5 Loaded based on batch results received&amp;lt;BR&amp;gt;&lt;br /&gt;
6 Pre-ticketed load released&amp;lt;BR&amp;gt;&lt;br /&gt;
7 Geofence entered/exited&amp;lt;BR&amp;gt;&lt;/div&gt;</summary>
		<author><name>Chanson</name></author>
	</entry>
</feed>