J
Jay
Hi-
Not sure if this should be posted in Query questions or Import/Export. Here
is the issue:
I have a manager who wants to see data in Excel, but doesn't understand the
65K limit. I am currently querying data by state and exporting to Excel,
however, some queries return upwards of 100K records.
The table I am using is joined to a member count query to give me members
per provider, and I use this to determine over/under 30 members.
What I'm having problems with is an accurate way to "split" a query to show
approx. half of the total records.
If anyone has had this problem I would certainly appreciate any insight. I
am using 2003.
Please see SQL below, and thanks in advance for the help!
SELECT COMB42_CHIMKT.Market, COMB42_CHIMKT.Grp_Prov_TIN,
COMB42_CHIMKT.Grp_ProviderID, COMB42_CHIMKT.Grp_ProvName,
COMB42_CHIMKT.Grp_ProvPhone, COMB42_CHIMKT.Grp_ProvAddress,
COMB42_CHIMKT.Grp_ProvCity, COMB42_CHIMKT.Grp_ProvState,
COMB42_CHIMKT.Grp_ProvZip, COMB42_CHIMKT.MemberName,
COMB42_CHIMKT.MemberUMID, COMB42_CHIMKT.DateOfBirth, COMB42_CHIMKT.HCC,
COMB42_CHIMKT.HCC_Desc, COMB42_CHIMKT.HCC_Status,
COMB42_CHIMKT.ProvSpecialty, COMB42_CHIMKT.Rnd_ProviderID,
COMB42_CHIMKT.Rnd_ProvName, COMB42_CHIMKT.Rnd_ProvPhone,
COMB42_CHIMKT.Rnd_ProvAddress1, COMB42_CHIMKT.Rnd_ProvAddress2,
COMB42_CHIMKT.Rnd_ProvAddress3, COMB42_CHIMKT.Rnd_ProvCity,
COMB42_CHIMKT.Rnd_ProvState, COMB42_CHIMKT.Rnd_ProvZip,
COMB42_CHIMKT.Claim_Src, COMB42_CHIMKT.Rnd_Prov_TIN,
COMB42_CHIMKT.Cond_Status, COMB42_CHIMKT.High_Dollar, COMB42_CHIMKT.CMS_Year,
qry42_OP_AC_MemCount.CountOfMemberUMID
FROM COMB42_CHIMKT
INNER JOIN qry42_OP_AC_MemCount ON COMB42_CHIMKT.Grp_Prov_TIN =
qry42_OP_AC_MemCount.Grp_Prov_TIN
GROUP BY COMB42_CHIMKT.Market, COMB42_CHIMKT.Grp_Prov_TIN,
COMB42_CHIMKT.Grp_ProviderID, COMB42_CHIMKT.Grp_ProvName,
COMB42_CHIMKT.Grp_ProvPhone, COMB42_CHIMKT.Grp_ProvAddress,
COMB42_CHIMKT.Grp_ProvCity, COMB42_CHIMKT.Grp_ProvState,
COMB42_CHIMKT.Grp_ProvZip, COMB42_CHIMKT.MemberName,
COMB42_CHIMKT.MemberUMID, COMB42_CHIMKT.DateOfBirth, COMB42_CHIMKT.HCC,
COMB42_CHIMKT.HCC_Desc, COMB42_CHIMKT.HCC_Status,
COMB42_CHIMKT.ProvSpecialty, COMB42_CHIMKT.Rnd_ProviderID,
COMB42_CHIMKT.Rnd_ProvName, COMB42_CHIMKT.Rnd_ProvPhone,
COMB42_CHIMKT.Rnd_ProvAddress1, COMB42_CHIMKT.Rnd_ProvAddress2,
COMB42_CHIMKT.Rnd_ProvAddress3, COMB42_CHIMKT.Rnd_ProvCity,
COMB42_CHIMKT.Rnd_ProvState, COMB42_CHIMKT.Rnd_ProvZip,
COMB42_CHIMKT.Claim_Src, COMB42_CHIMKT.Rnd_Prov_TIN,
COMB42_CHIMKT.Cond_Status, COMB42_CHIMKT.High_Dollar, COMB42_CHIMKT.CMS_Year,
qry42_OP_AC_MemCount.CountOfMemberUMID
HAVING (((COMB42_CHIMKT.Grp_ProvState)="IA") AND
((COMB42_CHIMKT.HCC_Status)="OPEN" Or (COMB42_CHIMKT.HCC_Status)="ACCEPTED")
AND ((qry42_OP_AC_MemCount.CountOfMemberUMID)>=30))
ORDER BY COMB42_CHIMKT.Grp_Prov_TIN, COMB42_CHIMKT.MemberUMID;
Not sure if this should be posted in Query questions or Import/Export. Here
is the issue:
I have a manager who wants to see data in Excel, but doesn't understand the
65K limit. I am currently querying data by state and exporting to Excel,
however, some queries return upwards of 100K records.
The table I am using is joined to a member count query to give me members
per provider, and I use this to determine over/under 30 members.
What I'm having problems with is an accurate way to "split" a query to show
approx. half of the total records.
If anyone has had this problem I would certainly appreciate any insight. I
am using 2003.
Please see SQL below, and thanks in advance for the help!
SELECT COMB42_CHIMKT.Market, COMB42_CHIMKT.Grp_Prov_TIN,
COMB42_CHIMKT.Grp_ProviderID, COMB42_CHIMKT.Grp_ProvName,
COMB42_CHIMKT.Grp_ProvPhone, COMB42_CHIMKT.Grp_ProvAddress,
COMB42_CHIMKT.Grp_ProvCity, COMB42_CHIMKT.Grp_ProvState,
COMB42_CHIMKT.Grp_ProvZip, COMB42_CHIMKT.MemberName,
COMB42_CHIMKT.MemberUMID, COMB42_CHIMKT.DateOfBirth, COMB42_CHIMKT.HCC,
COMB42_CHIMKT.HCC_Desc, COMB42_CHIMKT.HCC_Status,
COMB42_CHIMKT.ProvSpecialty, COMB42_CHIMKT.Rnd_ProviderID,
COMB42_CHIMKT.Rnd_ProvName, COMB42_CHIMKT.Rnd_ProvPhone,
COMB42_CHIMKT.Rnd_ProvAddress1, COMB42_CHIMKT.Rnd_ProvAddress2,
COMB42_CHIMKT.Rnd_ProvAddress3, COMB42_CHIMKT.Rnd_ProvCity,
COMB42_CHIMKT.Rnd_ProvState, COMB42_CHIMKT.Rnd_ProvZip,
COMB42_CHIMKT.Claim_Src, COMB42_CHIMKT.Rnd_Prov_TIN,
COMB42_CHIMKT.Cond_Status, COMB42_CHIMKT.High_Dollar, COMB42_CHIMKT.CMS_Year,
qry42_OP_AC_MemCount.CountOfMemberUMID
FROM COMB42_CHIMKT
INNER JOIN qry42_OP_AC_MemCount ON COMB42_CHIMKT.Grp_Prov_TIN =
qry42_OP_AC_MemCount.Grp_Prov_TIN
GROUP BY COMB42_CHIMKT.Market, COMB42_CHIMKT.Grp_Prov_TIN,
COMB42_CHIMKT.Grp_ProviderID, COMB42_CHIMKT.Grp_ProvName,
COMB42_CHIMKT.Grp_ProvPhone, COMB42_CHIMKT.Grp_ProvAddress,
COMB42_CHIMKT.Grp_ProvCity, COMB42_CHIMKT.Grp_ProvState,
COMB42_CHIMKT.Grp_ProvZip, COMB42_CHIMKT.MemberName,
COMB42_CHIMKT.MemberUMID, COMB42_CHIMKT.DateOfBirth, COMB42_CHIMKT.HCC,
COMB42_CHIMKT.HCC_Desc, COMB42_CHIMKT.HCC_Status,
COMB42_CHIMKT.ProvSpecialty, COMB42_CHIMKT.Rnd_ProviderID,
COMB42_CHIMKT.Rnd_ProvName, COMB42_CHIMKT.Rnd_ProvPhone,
COMB42_CHIMKT.Rnd_ProvAddress1, COMB42_CHIMKT.Rnd_ProvAddress2,
COMB42_CHIMKT.Rnd_ProvAddress3, COMB42_CHIMKT.Rnd_ProvCity,
COMB42_CHIMKT.Rnd_ProvState, COMB42_CHIMKT.Rnd_ProvZip,
COMB42_CHIMKT.Claim_Src, COMB42_CHIMKT.Rnd_Prov_TIN,
COMB42_CHIMKT.Cond_Status, COMB42_CHIMKT.High_Dollar, COMB42_CHIMKT.CMS_Year,
qry42_OP_AC_MemCount.CountOfMemberUMID
HAVING (((COMB42_CHIMKT.Grp_ProvState)="IA") AND
((COMB42_CHIMKT.HCC_Status)="OPEN" Or (COMB42_CHIMKT.HCC_Status)="ACCEPTED")
AND ((qry42_OP_AC_MemCount.CountOfMemberUMID)>=30))
ORDER BY COMB42_CHIMKT.Grp_Prov_TIN, COMB42_CHIMKT.MemberUMID;