The query below
causes Pervasive SQL 10.30.017 to crash. We've already discovered that
using DISTINCT in cross-database queries cause the database engine to
crash. In this instance, it looks like using CASE statements in a
cross-database query causes the engine to crash as well.
SELECT c.name,
m.last_name, m.first_name, m.addr1, m.city, m.state, m.zip,
m.hire_date,
m.ss_alpha, m.sex, m.birth_date,
Case m.eeo_class
when 1 then
'Officials and Managers'
when 11 then 'Executive'
when 12 then
'Manager'
when 2 then 'Professionals'
when 3 then 'Technician'
when
4 then 'Sales'
when 5 then 'Administrative Support'
when 6 then
'Craft Workers'
when 7 then 'Operatives'
when 8 then 'Laborers'
when
9 then 'Service Workers'
end as EEO_Class,
m.hourly, m.freq,
CASE
m.empl_status
when 1 then 'Regular FT'
when 2 then 'Regular PT
With Benefits'
when 3 then 'Regular PT Without Benefits'
when 4
then 'Temp FT'
when 5 then 'Temp PT'
when 6 then 'Leave of
Absense'
when 7 then 'On Call'
END AS FT_Status,
m.base_rate
as Base_Rate, m.gross_yr
FROM APEX132010.PR_MAST m inner join
APEX132010.CL_MAST
C ON M.LOC_NO = C.LOC_NO
WHERE c.loc_no in
(2919,3071,3373,3375,3467,2918,2983,2920,3393,3374,3401,3320,3092,2956)
and
active_stat = 'A'
UNION
SELECT c.name,m.last_name, m.first_name,
m.addr1, m.city,m.state,m.zip,
m.hire_date, m.ss_alpha, m.sex,
m.birth_date,
Case m.eeo_class
when 1 then 'Officials and
Managers'
when 11 then 'Executive'
when 12 then 'Manager'
when
2 then 'Professionals'
when 3 then 'Technician'
when 4 then
'Sales'
when 5 then 'Administrative Support'
when 6 then 'Craft
Workers'
when 7 then 'Operatives'
when 8 then 'Laborers'
when 9
then 'Service Workers'
end as EEO_Class,
m.hourly, m.freq,
CASE
m.empl_status
when 1 then 'Regular FT'
when 2 then 'Regular PT
With Benefits'
when 3 then 'Regular PT Without Benefits'
when 4
then 'Temp FT'
when 5 then 'Temp PT'
when 6 then 'Leave of
Absense'
when 7 then 'On Call'
END AS FT_Status,
m.base_rate
as Base_Rate, m.gross_yr
FROM APEX152010.PR_MAST m inner join
APEX152010.CL_MAST
C ON M.LOC_NO = C.LOC_NO
WHERE c.loc_no = 2014
AND active_stat =
'A'
ORDER BY c.name, m.last_name, m.first_name;
I don't think
this query is malformed in any way. Even if it were, why would the
database crash because of it?