Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
BEGIN
Create temporary table tmp_Veh as
SELECT 'OFFENSE' as TblSource
, v.Primary as UNIQUEKEY
, v.VIN as VIN
, v.YEAR as VYEAR
, v.MAKE as MAKE
, v.Model as VModelText
, v.License as TAG
, v.Lic_Stat as STATE
, v.Top_clr + ' ' + v.Bot_clr as COLORSOLID
, ' ' as ORIGINATINGORG
, 1 as TotalCount
FROM Vehicle v inner join incident i on v.CN = i.CN
INNER JOIN charges c on v.CN = c.CN
WHERE UPPER(v.Lic_Stat) = ?
UNION
SELECT 'TRAFFIC' as TblSource
, v.Primary as UNIQUEKEY
, v.VIN as VIN
, v.YEAR as VYEAR
, v.MAKE as MAKE
, v.Model as VModelText
, v.License as TAG
, v.Lic_Stat as STATE
, v.Top_clr + ' ' + v.Bot_clr as COLORSOLID
, ' ' as ORIGINATINGORG
, 1 as TotalCount
FROM Vehicle v inner join incident i on v.CN = i.CN
INNER JOIN accident c on v.CN = c.ComplaintNumber
WHERE LTRIM(v.Lic_Stat) = ?
UNION
SELECT 'UCM' as TblSource
, v.Primary as UNIQUEKEY
, v.VIN as VIN
, v.YEAR as VYEAR
, v.MAKE as MAKE
, v.Model as VModelText
, v.License as TAG
, v.Lic_Stat as STATE
, v.Top_clr + ' ' + v.Bot_clr as COLORSOLID
, ' ' as ORIGINATINGORG
, 1 as TotalCount
FROM Vehicle v inner join incident i on v.CN = i.CN
INNER JOIN ticket t on i.CN = t.CaseNumber
WHERE LTRIM(v.Lic_Stat) = ?
ALTER TABLE tmp_Veh ADD Column RowNum AUTO_INCREMENT
Select * from tmp_Veh where RowNum > 0 and RowNum < 10
COMMIT
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Create temporary table tmp_Veh as
SELECT 'OFFENSE' as TblSource
' at line 2