| RESULTSET |
| query |
| |
BESTANDOR |
BESTCASH |
BESTCOST |
BESTRATE |
BESTTIME |
CASHTOTAL |
DTISTOPDATE |
LNGMODELYEAR |
LNGSPECIALCASH |
LNGTOTALCASH |
LNGTYPE |
PK_AUTSFINCENTIVEID |
PK_AUTSFINCENTIVESPECIALID |
TOTALREBATEOPPORTUNITY |
TXTMAKE |
TXTMODEL |
TXTSPECIALBODY |
TXTSPECIALQUALIFY |
TXTSPECIALRESTRICTIONS |
TXTSPECIALTITLE |
TXTVEHICLEHINTS |
TXTVEHICLEHINTSFOREXCLUSION |
| 1 |
and
|
0
|
21.69
|
1.99
|
48
|
2000
|
2026-11-12 00:00:00.0
|
2026
|
500
|
2000.00
|
2
|
10116
|
86011649
|
2500.00
|
Mitsubishi
|
Eclipse Cross SE E62
|
Mitsubishi recognizes the dedication and achievements of the hardworking women and men of the military. Your investment in this country is to be commended, and in recognition of your efforts, Mitsubishi Motors is offering you a $500 rebate on select models. Important restrictions and rules apply. See your participating Dealer for the program details.
|
[empty string]
|
[empty string]
|
Military Program
|
{MODEL:ECLIPSE CROSS,TRIM:SE,PACKAGE_CODE:E62,MODEL_CODE:EC45-J}
|
[empty string]
|
| 2 |
and
|
0
|
21.69
|
1.99
|
48
|
2000
|
2026-11-12 00:00:00.0
|
2026
|
500
|
2000.00
|
2
|
10117
|
86011651
|
2500.00
|
Mitsubishi
|
Eclipse Cross SE E63
|
Mitsubishi recognizes the dedication and achievements of the hardworking women and men of the military. Your investment in this country is to be commended, and in recognition of your efforts, Mitsubishi Motors is offering you a $500 rebate on select models. Important restrictions and rules apply. See your participating Dealer for the program details.
|
[empty string]
|
[empty string]
|
Military Program
|
{MODEL:ECLIPSE CROSS,TRIM:SE,PACKAGE_CODE:E63,MODEL_CODE:EC45-J}
|
[empty string]
|
|
| SQL |
SELECT tblSFIncentives.PK_autSFIncentiveID,
tblSFIncentives.txtMake,
tblSFIncentives.txtModel,
tblSFIncentives.lngModelYear,
tblSFIncentives.lngTotalCash,
tblSFIncentives.txtVehicleHints,
tblSFIncentives.txtVehicleHintsForExclusion,
tblSFIncentives.dtiStopDate,
tblSFIncentiveSpecials.PK_autSFIncentiveSpecialID,
tblSFIncentiveSpecials.txtSpecialTitle,
tblSFIncentiveSpecials.lngSpecialCash,
tblSFIncentiveSpecials.txtSpecialBody,
tblSFIncentiveSpecials.txtSpecialQualify,
tblSFIncentiveSpecials.txtSpecialRestrictions,
tblSFIncentiveSpecials.lngType,
tblSFIncentives.lngTotalCash +
(SELECT SUM(S2.lngSpecialCash)
FROM tblSFIncentiveSpecials S2
WHERE S2.FK_lngSFIncentiveID = tblSFIncentives.PK_autSFIncentiveID
AND S2.ysnActive = 1
AND S2.lngType = 2) AS TotalRebateOpportunity,
(SELECT SUM(Cash.lngCash)
FROM tblSFIncentiveCash Cash
WHERE Cash.FK_lngSFIncentiveID = tblSFIncentives.PK_autSFIncentiveID
AND Cash.ysnActive = 1) AS CashTotal,
BestAPR.lngTime AS BestTime,
BestAPR.txtValue AS BestRate,
BestAPR.lngCash AS BestCash,
BestAPR.txtAndOR AS BestAndOr,
BestAPR.lngCostPer1000 AS BestCost
FROM tblSFIncentives
LEFT JOIN tblSFIncentiveSpecials
ON tblSFIncentives.PK_autSFIncentiveID = tblSFIncentiveSpecials.FK_lngSFIncentiveID
AND tblSFIncentiveSpecials.ysnActive = 1
AND tblSFIncentiveSpecials.lngType = 2
LEFT JOIN tblSFIncentiveCodeLink
ON tblSFIncentives.PK_autSFIncentiveID = tblSFIncentiveCodeLink.FK_lngSFIncentiveID
AND tblSFIncentiveCodeLink.txtStyleID = '0'
OUTER APPLY (
SELECT TOP 1 tblSFIncentiveAPRs.lngTime,
tblSFIncentiveAPRs.txtValue,
tblSFIncentiveAPRs.lngCash,
tblSFIncentiveAPRs.txtAndOr,
tblSFIncentiveAPRs.lngCostPer1000
FROM tblSFIncentiveAPRs
WHERE tblSFIncentiveAPRs.FK_lngSFIncentiveID = tblSFIncentives.PK_autSFIncentiveID
AND tblSFIncentiveAPRs.ysnActive = 1
ORDER BY tblSFIncentiveAPRs.txtValue, tblSFIncentiveAPRs.lngTime DESC
) AS BestAPR
WHERE tblSFIncentives.lngModelYear = '2026'
AND tblSFIncentives.txtMake = 'Mitsubishi'
-- AND tblSFIncentives.FK_lngDealerID = '4'
AND (
tblSFIncentiveCodeLink.txtStyleID IS NOT NULL
OR
tblSFIncentives.txtModel = 'Eclipse Cross'
OR (
(tblSFIncentives.txtVehicleHints LIKE '%MODEL:Eclipse Cross[,}]%' OR tblSFIncentives.txtVehicleHints NOT LIKE '%MODEL:%')
AND (
tblSFIncentives.txtVehicleHints LIKE '%MODEL_CODE:EC45-J[,}]%'
OR (
tblSFIncentives.txtVehicleHints NOT LIKE '%MODEL_CODE:%'
AND
tblSFIncentives.txtVehicleHintsForExclusion NOT LIKE '%MODEL_CODE:EC45-J[,}]%'
)
)
AND (
tblSFIncentives.txtVehicleHints LIKE '%TRIM:SE[,}]%'
OR (
tblSFIncentives.txtVehicleHints NOT LIKE '%TRIM:%'
AND
tblSFIncentives.txtVehicleHintsForExclusion NOT LIKE '%TRIM:SE[,}]%'
)
)
)
)
AND tblSFIncentives.ysnActive = 1
AND tblSFIncentives.dtiStopDate >= Convert(DateTime, Floor(Convert(Float, getdate())))
ORDER BY tblSFIncentives.txtMake, tblSFIncentives.lngModelYear DESC, tblSFIncentives.txtModel |