Ver Mensaje Individual
  #7 (permalink)  
Antiguo 22/11/2005, 13:35
SOFIA_ME_GUSTA
 
Fecha de Ingreso: octubre-2005
Mensajes: 365
Antigüedad: 21 años, 1 mes
Puntos: 0
Aquí pongo el codigo original de lo que estoy intentando hacer, es decir reemplazar el WHERE ya mencionado por



Código PHP:
FROM Claims LEFT JOIN ClaimsFollowUp ON Claims.ClaimID=ClaimsFollowUp.RepricingID
LEFT JOIN Repricing ON ClaimsFollowUp
.RepricingID=Repricing.RepricingID 
Con el error de que me Falta operador, lo cual me parece inconcebible (já, estoy en Acces)

Bueno si alguien me socorre le estaré inmensamente agradecirdo.

Saludos.


Código PHP:
SELECT Claims.ClaimID, Claims.PatientID AS Patient, Claims.ProviderID AS Proivider, Claims.InsurerID AS Insurer, Claims.DateOfService AS DOS, 
Claims.DateOfReceiptByMDabroad AS DOR, Repricing.ConvertedHospitalCharges AS Hosp_Charges, Repricing.HospitalChargesDiscountAmount AS Hosp_Dct_to_Insurer, Repricing.ConvertedProfessionalCharges AS Prof_Charges, Repricing.ProfessionalChargesDiscountAmount AS Prof_Dct_to_Ins, (Repricing.ConvertedTotalCharges-(Prof_Dct_to_Ins+Hosp_Dct_to_Insurer)) AS Due_By_Insurer, Claims.HospitalChargesDiscount AS Hosp_Pct_to_MD, Claims.ProfessionalChargesDiscount AS Prof_Pct_to_MD, SUM(ClaimsFollowUp.AmountReceived) AS IP, Due_By_Insurer-IP AS Balance, (((Hosp_Charges-Hosp_Dct_to_Insurer)*100)/Due_By_Insurer) AS perc_hospital, (((Prof_Charges-Prof_Dct_to_Ins)*100)/Due_By_Insurer) AS perc_professional, ((Balance*perc_hospital)/100) AS Hosp_Balance, ((Balance*perc_professional)/100) 
AS 
Prof_Balance, (Hosp_Balance*Hosp_Pct_to_MD) AS Hosp_Fees_Outs, (Prof_Balance*Prof_Pct_to_MD) AS Prof_Fees_Outs, (Hosp_Fees_Outs+Prof_Fees_Outs) 
AS 
Total_Fees_Outstanding, Claims.ClaimStatus, Claims.Responsible


FROM Claims LEFT JOIN ClaimsFollowUp ON Claims
.ClaimID=ClaimsFollowUp.RepricingID
LEFT JOIN Repricing ON ClaimsFollowUp
.RepricingID=Repricing.RepricingID 



GROUP BY Claims
.ClaimStatus, Claims.ClaimID, Repricing.ConvertedTotalCharges, Repricing.ConvertedProfessionalCharges, Repricing.ConvertedHospitalCharges, Claims.HospitalChargesDiscount, Claims.ProfessionalChargesDiscount, Repricing.ProfessionalChargesDiscountAmount, 
Repricing.HospitalChargesDiscountAmount, Claims.DateOfService, Claims.DateOfReceiptByMDabroad, Claims.Responsible, Claims.InsurerID, 
Claims.ProviderID, Claims.PatientID;