Help formating data from query

Mike Hughes

Registered User.
Local time
Today, 23:20
Joined
Mar 23, 2002
Messages
493
I’m retrieving information on members of a case.
Each case has one dad, one mom and one or more child(ren).
When the query is run I get the information I want but when a
case has more than one child the query is generating a full line of
information for each additional child. Here is an example of what is returned.
CASE DAD FN DAD LN MOM FN MOM LN CHILD FN CHILD LN
123 JAMES BROWN DARK BROWN LIGHT BROWN
123 JAMES BROWN DARK BROWN BROWN BROWN

What I want the query to do is to list everyone on one line, no matter how many children there are.
Is there a way to do this and how?

Here is the query

SELECT
NOLDBA_INT_CASE_STATUS.IV_D_DO_CODE,
NOLDBA_INT_CASE_STATUS.WORKER_ID,
a.MEMBER_ID,
b.NAME_FIRST,
b.NAME_LAST,
b.MEM_SSN,
b.DATE_BRTH,
c.MEMBER_ID,
d.NAME_FIRST,
d.NAME_LAST,
d.MEM_SSN,
d.DATE_BRTH,
e.MEMBER_ID,
f.NAME_FIRST,
f.NAME_LAST,
f.MEM_SSN,
f.DATE_BRTH


FROM
NOLDBA_INT_CASE_STATUS,
NOLDBA_INT_CASE_MEMBER AS a,
NOLDBA_INT_MEMBER_DEMOGRAPHIC AS b,
NOLDBA_INT_CASE_MEMBER AS c,
NOLDBA_INT_MEMBER_DEMOGRAPHIC AS d,
NOLDBA_INT_CASE_MEMBER AS e,
NOLDBA_INT_MEMBER_DEMOGRAPHIC AS f

WHERE
a.RELATION_CODE='A' And
c.RELATION_CODE= 'C' And
e.RELATION_CODE= 'D' And
NOLDBA_INT_CASE_STATUS.CASE_STATUS='O' And
a.CASE_ID=NOLDBA_INT_CASE_STATUS.CASE_ID And
a.MEMBER_ID=b.MEMBER_ID And
c.CASE_ID=NOLDBA_INT_CASE_STATUS.CASE_ID And
c.MEMBER_ID=d.MEMBER_ID And
e.CASE_ID=NOLDBA_INT_CASE_STATUS.CASE_ID And
e.MEMBER_ID=f.MEMBER_ID;
 
Last edited:
Try a Totals (Σ) Query, group by CASE DAD FN DAD LN MOM FN MOM, and count the children.
 

Users who are viewing this thread

Back
Top Bottom