Home » Developer & Programmer » Reports & Discoverer » Union (6i 10g)
Union [message #685020] Sun, 10 October 2021 04:00 Go to next message
shahzad-ul-hasan
Messages: 596
Registered: August 2002
Senior Member
select bcampus,stuid,name,class,status,f_name,fcnic,tuition,coment from sis.basic,sis.student,sis.family
where family.fcnic=fcnic
and family.fam_id=student.fam_id
union
select bcampus,stuid,name,class,status,f_name,fcnic,tuition,coment from sis1.basic,sis1.student,sis1.family
where family.fcnic=fcnic
and  family.fam_id=student.fam_id
union
select bcampus,stuid,name,class,status,f_name,fcnic,tuition,coment from gtt.basic,gtt.student,gtt.family
where family.fcnic=fcnic
and family.fam_id=student.fam_id
order by fcnic
I am using this query. I want to find those records which is found in other users tables. Please see the attached file.but it also whose records which is in the one table of the same user which I connect. Please advisef
Re: Union [message #685021 is a reply to message #685020] Mon, 11 October 2021 04:16 Go to previous message
John Watson
Messages: 8644
Registered: January 2010
Location: Global Village
Senior Member
I do not see any relationship between the query you have posted and the image you have uploaded. For example, the query projects nine columns but the image has eight; the query has an ORDER BY clause but the rows in the image do not appear to be sorted. Furthermore, I would expect this construct
where family.fcnic=fcnic
to generate an error,
ORA-00918: column ambiguously defined
You had better start again.

(and, by the way, I wish you would not say "record" when you mean "row").
Previous Topic: Barcode not showed to execute reports to printer. File .eps
Next Topic: Hide parameter report
Goto Forum:
  


Current Time: Tue Dec 07 10:21:25 CST 2021