Not enough space on temporary disk

B

Bev

I am running a select query that is giving be the above error. The query ran
fine yesterday and when I changed the parameter in the DQBBDA field, I got
the above error. The tables are linked from AS400 and primary keys are set.
I cannot change the indexing because they are linked. I have primary keys on
all fields that are joined or used in criteria selection.

Any suggestion to fix this problem would be appreciated. SQL as follows:
SELECT CLMPRDFIL_RCTCDR09.DQP2NB AS [Claim Number],
CLMPRDFIL_RCTCDR09.DQOINB AS [Seq Number], CLMPRDFIL_RCTCDR09.DQUJCD AS
[Pharmacy #], CLMPRDFIL_RCTCDR09.DQUKCD AS RxNumber,
CLMPRDFIL_RCTCDR09.DQBBDA AS [Fill Date], CLMPRDFIL_RCTCDR09.DQC2DT AS
[Submitted Date], CLMPRDFIL_RCTCDR09.DQS8CD AS [Group#],
CLMPRDFIL_RCTCDR09.DQOKCD AS [Submitted ID], CLMPRDFIL_RCTCDR09.DQALDT AS
DOB, CLMPRDFIL_RCTCDR09.DQS5CD AS [Member iD], CLMPRDFIL_RCTCDR09.DQK7TX AS
[First Name], CLMPRDFIL_RCTCDR09.DQK8TX AS [Last Name],
CLMPRDFIL_RCTCDR09.DQILNB AS [Metric Qty], CLMPRDFIL_RCTCDR09.DQIONB AS
DspQty, CLMPRDFIL_RCTCDR09.DQIMNB AS DS, CLMPRDFIL_RCTCDR09.DQPECD AS GPI,
CLMPRDFIL_RCTCDR09.DQRIC4 AS NDC, CLMPRDFIL_RCPIDR03.S4CNT3 AS Product1,
CLMPRDFIL_RCPIDR03.S4COT3 AS Product2, CLMPRDFIL_RCTCDR09.DQDMPR AS
[Submitted Cost], CLMPRDFIL_RCTCDR09.DQDOPR AS [Submitted Fee],
CLMPRDFIL_RCTCDR09.DQDQPR AS [Submitted Due], CLMPRDFIL_RCTCDR09.DQABDA AS
[Date Rx Written], CLMPRDFIL_RCTCDR09.DQDPPR AS [UC/W],
CLMPRDFIL_RCTCDR09.DQTCCD AS [Prescribing DEA#], CLMPRDFIL_RCTCDR09.DQS6CD AS
Carrier, CLMPRDFIL_RCTCDR09.DQS7CD AS Account, CLMPRDFIL_RCTCDR09.DQS8CD AS
[Group], CLMPRDFIL_RCRXSR01.DNKUST AS Expr1, CLMPRDFIL_RCPDTR01.E0ERPR AS
[PDT App Ingredient Cst], CLMPRDFIL_RCPDTR01.E0ESPR AS [PDT App Dispensing
Fee], CLMPRDFIL_RCPDTR01.E0EWPR AS [PDT Cal Patient Pay Amt],
CLMPRDFIL_RCPDTR01.E0DLP4 AS [PDT App Copay Flat $ Amt],
CLMPRDFIL_RCPDTR01.E0DMP4 AS [PDT App Copay Prcnt $ Amt],
CLMPRDFIL_RCPDTR01.E0E0PR AS [PDT App Amt Appl Per Dedu], [T001b_Last RCPD7P
Record each line].ASM1IH AS [PD7 ID], [T001b_Last RCPD7P Record each
line].ASALHY AS [PD7 Patient Pay Amount], [T001b_Last RCPD7P Record each
line].ASTSHX AS [PD7 Sav Acct Amount], CLMPRDFIL_RCPDTR01.E0EVPR AS [PDT App
Total Amount], CLMPRDFIL_RCTCDR09.DQP2NB AS Claim, CLMPRDFIL_RCTCDR09.DQOINB
AS Seq, CLMPRDFIL_RCTCDR09.DQP2NB, CLMPRDFIL_RCTCDR09.DQOINB,
CLMPRDFIL_RCTCDR09.DQBBDA
FROM (((CLMPRDFIL_RCTCDR09 LEFT JOIN CLMPRDFIL_RCRXSR01 ON
(CLMPRDFIL_RCTCDR09.DQOINB = CLMPRDFIL_RCRXSR01.DNPTNB) AND
(CLMPRDFIL_RCTCDR09.DQP2NB = CLMPRDFIL_RCRXSR01.DNP2NB)) LEFT JOIN
CLMPRDFIL_RCPDTR01 ON (CLMPRDFIL_RCTCDR09.DQOINB = CLMPRDFIL_RCPDTR01.E0OINB)
AND (CLMPRDFIL_RCTCDR09.DQP2NB = CLMPRDFIL_RCPDTR01.E0P2NB)) LEFT JOIN
[T001b_Last RCPD7P Record each line] ON (CLMPRDFIL_RCTCDR09.DQOINB =
[T001b_Last RCPD7P Record each line].ASOINB) AND (CLMPRDFIL_RCTCDR09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DTR01.E0DMP4,
CLMPRDFIL_RCPDTR01.E0E0PR, [T001b_Last RCPD7P Record each line].ASM1IH,
[T001b_Last RCPD7P Record each line].ASALHY, [T001b_Last RCPD7P Record each
line].ASTSHX, CLMPRDFIL_RCPDTR01.E0EVPR, CLMPRDFIL_RCTCDR09.DQP2NB,
CLMPRDFIL_RCTCDR09.DQOINB, CLMPRDFIL_RCTCDR09.DQP2NB,
CLMPRDFIL_RCTCDR09.DQOINB, CLMPRDFIL_RCTCDR09.DQBBDA
HAVING (((CLMPRDFIL_RCTCDR09.DQBBDA)>=20080601 And
(CLMPRDFIL_RCTCDR09.DQBBDA)<=20080630) AND
((CLMPRDFIL_RCTCDR09.DQS6CD)="IHA001") AND ((CLMPRDFIL_RCTCDR09.DQS7CD)="70")
AND ((CLMPRDFIL_RCRXSR01.DNKUST)="P"));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top