Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selection Expert question

Status
Not open for further replies.

TheStone

Technical User
Oct 23, 2000
6
US
I'm using Cyrstal 8.0 and querying against an Oracle Database. I am displaying fields from a table called Table1. The last field that I want to display in my report is from a table called MISC. The field name in MISC that I want to display is called Remarks. In the MISC table, there is also a field called Parent.

Now, in the Database, There is a field in Table 1 called Remarks, a field in Table 2 called Remarks, a field in Table 3 called Remarks, and so on. Every time a user inputs a remark in table 1, the remark posts into the MISC.Remarks (table/field) and also posts a two character code in MISC.Parent. In every case, the parent field will display T1 (coming form table 1), T2 (coming from Table 2), and so on.

So, here's my question. I want to add the Remarks section on my report. So, what I did is went to the select expert for the MISC.Parent and had it equal T1. Thus, all remarks from table 1 remarks entries would populate. However, if no comments were ever entered, the entire record is suppressed so that I can view other information on the report.

So, how do I grab info in the MISC.Remarks section while narrowing down the remarks that I want AND without suppressing other fields I'm using to query when there are no remarks?

Thanks
 
You will need to do an outer join to get the results from the first table, when there are no matching results in the misc table. I think the syntax for an outer join in Oracle is
first table field (+)= second table field

I am not sure on the syntax for a join, it has been a while since I did any type of an Oracle select. The "select expert" you mention may give you more information on outer joins.

Good luck.
Crystal
crystalized_s@yahoo.com

--------------------------------------------------

Experience is one thing you can't get for nothing.

-Oscar Wilde

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top