Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/12/2005, 10:41
SOFIA_ME_GUSTA
 
Fecha de Ingreso: octubre-2005
Mensajes: 365
Antigüedad: 18 años, 7 meses
Puntos: 0
No me Fucniona el Count() Access

Tengo esta consulta que funiona bien:

Código PHP:
SELECT Claims.ClaimIDClaims.PatientID AS PatientClaims.ProviderID AS ProviderClaims.InsurerID AS InsurerClaims.DateOfService AS DOSClaims.DateOfReceiptByMDabroad AS DORRepricing.ConvertedHospitalCharges AS Hosp_ChargesRepricing.HospitalChargesDiscountAmount AS Hosp_Dct_to_InsurerRepricing.ConvertedProfessionalCharges AS Prof_ChargesRepricing.ProfessionalChargesDiscountAmount AS Prof_Dct_to_Ins, (Repricing.ConvertedTotalCharges-(Prof_Dct_to_Ins+Hosp_Dct_to_Insurer)) AS Due_By_InsurerClaims.HospitalChargesDiscount AS Hosp_Pct_to_MDClaims.ProfessionalChargesDiscount AS Prof_Pct_to_MDSUM(IIf(ISNULL(ClaimsFollowUp.AmountReceived),0,ClaimsFollowUp.AmountReceived)) AS IPDue_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_OutstandingClaims.ClaimStatusClaims.ResponsibleClaims.ClaimType

FROM 
(Claims INNER JOIN Repricing ON Claims.ClaimID=Repricing.RepricingIDLEFT JOIN ClaimsFollowUp ON Repricing.RepricingID=ClaimsFollowUp.RepricingID

WHERE 
(Claims.ClaimStatus)<>"9. Case Closed" AND DateOfReceiptByMDabroad BETWEEN date() AND date()-30 AND ClaimType="Billing"

GROUP BY Claims.ClaimStatusClaims.ClaimIDRepricing.ConvertedTotalChargesRepricing.ConvertedProfessionalChargesRepricing.ConvertedHospitalChargesClaims.HospitalChargesDiscountClaims.ProfessionalChargesDiscountRepricing.ProfessionalChargesDiscountAmountRepricing.HospitalChargesDiscountAmountClaims.DateOfServiceClaims.DateOfReceiptByMDabroadClaims.ResponsibleClaims.InsurerIDClaims.ProviderIDClaims.PatientIDClaims.ClaimType


Y cuando le coloco un Simple Count(*) No me lo hace, es decir sale 1 en esa columna:

Código PHP:
SELECT  COUNT(*) AS TotalClaims.ClaimIDClaims.PatientID AS PatientClaims.ProviderID AS ProviderClaims.InsurerID AS InsurerClaims.DateOfService AS DOSClaims.DateOfReceiptByMDabroad AS DORRepricing.ConvertedHospitalCharges AS Hosp_ChargesRepricing.HospitalChargesDiscountAmount AS Hosp_Dct_to_InsurerRepricing.ConvertedProfessionalCharges AS Prof_ChargesRepricing.ProfessionalChargesDiscountAmount AS Prof_Dct_to_Ins, (Repricing.ConvertedTotalCharges-(Prof_Dct_to_Ins+Hosp_Dct_to_Insurer)) AS Due_By_InsurerClaims.HospitalChargesDiscount AS Hosp_Pct_to_MDClaims.ProfessionalChargesDiscount AS Prof_Pct_to_MDSUM(IIf(ISNULL(ClaimsFollowUp.AmountReceived),0,ClaimsFollowUp.AmountReceived)) AS IPDue_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_OutstandingClaims.ClaimStatusClaims.ResponsibleClaims.ClaimType

FROM 
(Claims INNER JOIN Repricing ON Claims.ClaimID=Repricing.RepricingIDLEFT JOIN ClaimsFollowUp ON Repricing.RepricingID=ClaimsFollowUp.RepricingID

WHERE 
(Claims.ClaimStatus)<>"9. Case Closed" AND DateOfReceiptByMDabroad BETWEEN date() AND date()-30 AND ClaimType="Billing"

GROUP BY Claims.ClaimStatusClaims.ClaimIDRepricing.ConvertedTotalChargesRepricing.ConvertedProfessionalChargesRepricing.ConvertedHospitalChargesClaims.HospitalChargesDiscountClaims.ProfessionalChargesDiscountRepricing.ProfessionalChargesDiscountAmountRepricing.HospitalChargesDiscountAmountClaims.DateOfServiceClaims.DateOfReceiptByMDabroadClaims.ResponsibleClaims.InsurerIDClaims.ProviderIDClaims.PatientIDClaims.ClaimType

Por qué? Como lo corrijo? Se puede o no ?