Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Help in EXCEL
Does it give you the wrong answer or an error? Always zero? What if you run
"Select AmtRX from ClaimInfoFacets" or "Select sum(AmtRX) from ClaimInfoFacets" ? I often try simpler versions of a troublesome query in an interactive query tool or at a command line, check results and build it up until I understand the problem -- Bob Kilmer "Heather" wrote in message ... Does anyone know what is wrong with this? I can't get it to calculate the AmtRx correctly??? 'ClaimInfo data for the GroupID If ClassVar1 = "" And ClassVar2 = "" And ClassVar3 = "" _ And PlanVar1 = "" And PlanVar2 = "" And PlanVar3 = "" _ And BusVar1 = "" And BusVar2 = "" And BusVar3 = "" _ Then strSQL = "Select PaidDtYM, sum(AmtMed), sum(AmtVis), sum (AmtRX), sum(AmtOth)" & _ " From ClaimInfoFacets " & _ " Where GroupID IN ('" & GroupVar1 & "','" & GroupVar2 & "', '" & GroupVar3 & "') " & _ " And PaidDtYM Between " & BCD & " AND " & ECD & _ " Group By PaidDtYM" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|