Home » Developer & Programmer » Reports & Discoverer » how get combine report with using tree query
how get combine report with using tree query [message #186756] Wed, 09 August 2006 06:46 Go to next message
mfa786
Messages: 210
Registered: February 2006
Location: karachi
Senior Member
Sir I have tree spared query how i report how I link all query with each other the STUSECMTAMT .stdcode this is same column in each query


SELECT STUSECMTAMT .stdcode,RATES.description,RATES.amount,STUINV.amt-RATES.amount AS addotherfee,STUINV.amt,STUINV.discperc,(STUINV.amt/100)*STUINV.discperc AS disamo, STUINV.debit
FROM STUSECMTAMT,STUINV,RATES,STUJOURNAL WHERE STUSECMTAMT.vhno=STUJOURNAL.ref_no AND STUSECMTAMT.VHNO=STUINV.vhno AND STUINV.ratescode=RATES.ratescode AND STUSECMTAMT.SCHEME_MST_ID=RATES.SCHEME_MST_ID AND STUSECMTAMT.vhno='SIN02080018'

=====================
SELECT STUSECMTAMT .stdcode ,COURSES.name,COURSES.id,COURSES.crhrs,STUDEG.DEGREE_code,SCHEME_DEG_DET.amount FROM STUSECMTAMT,STUDEG,SCHEME_DEG_DET,SECCORS,COURSES,STUSEC
WHERE STUSECMTAMT.STUDEGid=STUDEG.STUDEGid AND STUSECMTAMT.scheme_mst_id=SCHEME_DEG_DET.scheme_mst_id AND
STUDEG.degree_code= SCHEME_DEG_DET.degree_code
AND
STUSEC.seccorscode=SECCORS.seccorscode AND SECCORS.coursescode=COURSES.coursescode AND STUSEC.vhno=STUSECMTAMT.VHNO
AND STUSECMTAMT.vhno='SIN05080109'

=======================
SELECT STUDENTS.STDCODE,STUDENTS.NAME,STUDENTS.FNAME,STUDENTS.ADDRESS1,STUDENTS.ADDRESS2,
STUDENTS.PHONE,STUDENTS.DEPART,STUDENTS.NIDCNO,STUDENTS.EMAIL
,SUM(STUSECMTAMT.TOTALCR) AS tchr,SUM(STUSECMTAMT.TOTDEBIT) AS tdebit,SUM(STUSECMTAMT.OTHERDR) AS totherdebit,SUM(STUSECMTAMT.GROSSDEBIT) AS grossdebit,SUM(STUSECMTAMT.DISCOUNT) AS discount,SUM(STUSECMTAMT.REFUND) AS refund,SUM(STUSECMTAMT.ADJAMOUNT) AS adj,SUM(STUJOURNAL.CRE_BAL) AS to_credeit,SUM(STUSECMTAMT.TOTDEBIT) -SUM(STUJOURNAL.CRE_BAL) AS balance
FROM STUDENTS,STUSECMTAMT,STUJOURNAL
WHERE STUDENTS.STDCODE=STUSECMTAMT.STDCODE AND STUSECMTAMT.vhno=STUJOURNAL.ref_no AND STUSECMTAMT.STDCODE ='021-99-10610'
GROUP BY STUDENTS.STDCODE,STUDENTS.NAME,STUDENTS.FNAME,STUDENTS.ADDRESS1,STUDENTS.ADDRESS2,
STUDENTS.PHONE,STUDENTS.DEPART,STUDENTS.NIDCNO,STUDENTS.EMAIL

Please give me idea how I get combine report using tree query

What I use data link or what

thanks

aamir

Re: how get combine report with using tree query [message #187496 is a reply to message #186756] Mon, 14 August 2006 04:21 Go to previous message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

You want this in a single query?
Try this.

Select [fields]
from (query_1) a, (query_2) b, (query_3) c
where a.stdcode = b.stdcode
and b.stdcode = c.stdcode
Previous Topic: Problem in creating template for XML report
Next Topic: REP-1219 and REP-1212 errors
Goto Forum:
  


Current Time: Tue Nov 26 13:56:34 CST 2024