I would like help resolving this problem. I'm a novice who's been
hired to query a hospital database and extract useful information,
available to me only in a dynamically generated, downloadable .mdb.
The query below query runs correctly and without error, but any
attempt to save it causes Access to crash without a message, leaving
the .ldb file. Opening the DB reveals it saved a blank "query1".
I've upgraded to Jet SP 8, and I'm running Office 2000 on WinXP.
Access runs fine, other than this. Any insight?
The query (counts the total number of PSA tests taken in 6-month
intervals of time after RP surgeries):
SELECT IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=0,'',
IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=6,'a
0-6', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=12,'b
6-12', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=18,'c
12-18', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=24,'d
18-24', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=30,'e
24-30', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=36,'f
30-36', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=42,'g
36-42', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=48,'h
42-48', 'i 48+'))))))))) AS [DateInterval], count(*) AS [Count] FROM
AnnualSurgeryAn dFollowupPSA
GROUP BY IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=0,'',
IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=6,'a
0-6', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=12,'b
6-12', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=18,'c
12-18', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=24,'d
18-24', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=30,'e
24-30', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=36,'f
30-36', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=42,'g
36-42', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=48,'h
42-48', 'i 48+')))))))));
Other queries it calls:
AnnualSurgeryAn dFollowupPSA (lists each individual PSA test taken for
each patient after their RP surgery, where their surgery occurred
between given years):
SELECT patient.lastNam e, patient.firstNa me, RP.date,
IIf(PSA.totalPS A<=[PSACutoff],'Yes','No') AS ZeroPSA, PSA.date,
PSA.totalPSA
FROM patient, RP, PSA
WHERE patient.patient ID=RP.patient And RP.date Between
DateValue('1/1/'+[StartingYear]) And DateValue('31/12/'+[EndingYear])
And patient.patient ID=PSA.patient And PSA.date>RP.dat e
ORDER BY patient.lastNam e, patient.firstNa me, RP.date, PSA.date;
RP (unifies the unique patient ID and RP surgery date of each patient
from 2 source tables):
SELECT RPRecord.patien t AS [patient], RPRecord.startD ate AS [date]
FROM RPRecord
UNION SELECT RP_Pathology.pa tient, RP_Pathology.pr ocedureDate FROM
RP_Pathology;
I'm inclined to blame Microsoft (I wouldn't have touched Access if I
didn't have to provide a simple interface for the Doctors) for YAFB
(Yet Another Fatal Bug), and put yet another batshit crazy, waving the
dead chicken voodoo curse on Bill Gates, but I'm open to the
possibility that this is my fault (being utterly 'teh n00b'), or that
this is easily fixable with settings changes or patches. The point
is, I really need this to work.
Thank you, in advance, for your help
hired to query a hospital database and extract useful information,
available to me only in a dynamically generated, downloadable .mdb.
The query below query runs correctly and without error, but any
attempt to save it causes Access to crash without a message, leaving
the .ldb file. Opening the DB reveals it saved a blank "query1".
I've upgraded to Jet SP 8, and I'm running Office 2000 on WinXP.
Access runs fine, other than this. Any insight?
The query (counts the total number of PSA tests taken in 6-month
intervals of time after RP surgeries):
SELECT IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=0,'',
IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=6,'a
0-6', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=12,'b
6-12', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=18,'c
12-18', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=24,'d
18-24', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=30,'e
24-30', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=36,'f
30-36', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=42,'g
36-42', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=48,'h
42-48', 'i 48+'))))))))) AS [DateInterval], count(*) AS [Count] FROM
AnnualSurgeryAn dFollowupPSA
GROUP BY IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=0,'',
IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=6,'a
0-6', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=12,'b
6-12', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=18,'c
12-18', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=24,'d
18-24', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=30,'e
24-30', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=36,'f
30-36', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=42,'g
36-42', IIf(DateDiff('m ',AnnualSurgery AndFollowupPSA. RP.date,AnnualS urgeryAndFollow upPSA.PSA.date) <=48,'h
42-48', 'i 48+')))))))));
Other queries it calls:
AnnualSurgeryAn dFollowupPSA (lists each individual PSA test taken for
each patient after their RP surgery, where their surgery occurred
between given years):
SELECT patient.lastNam e, patient.firstNa me, RP.date,
IIf(PSA.totalPS A<=[PSACutoff],'Yes','No') AS ZeroPSA, PSA.date,
PSA.totalPSA
FROM patient, RP, PSA
WHERE patient.patient ID=RP.patient And RP.date Between
DateValue('1/1/'+[StartingYear]) And DateValue('31/12/'+[EndingYear])
And patient.patient ID=PSA.patient And PSA.date>RP.dat e
ORDER BY patient.lastNam e, patient.firstNa me, RP.date, PSA.date;
RP (unifies the unique patient ID and RP surgery date of each patient
from 2 source tables):
SELECT RPRecord.patien t AS [patient], RPRecord.startD ate AS [date]
FROM RPRecord
UNION SELECT RP_Pathology.pa tient, RP_Pathology.pr ocedureDate FROM
RP_Pathology;
I'm inclined to blame Microsoft (I wouldn't have touched Access if I
didn't have to provide a simple interface for the Doctors) for YAFB
(Yet Another Fatal Bug), and put yet another batshit crazy, waving the
dead chicken voodoo curse on Bill Gates, but I'm open to the
possibility that this is my fault (being utterly 'teh n00b'), or that
this is easily fixable with settings changes or patches. The point
is, I really need this to work.
Thank you, in advance, for your help
Comment