× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



For something this basic, Oracle and i are both the same. =-O

Vern

Charles Wilt wrote:
You're operating under the misconception that the foreign key
definition effects the select; it doesn't.

With or without the foreign key definition the select will work the
same on either oracle or the i.

Foreign key constraints only come into play when
inserting/updating/deleting records.

Joins on the i work exactly the same as the do in oracle. (Exception
the i at v5r4 doesn't support FULL OUTER joins but 6.1 does)

Another misconception is that the fields have to have the same name to
be part of a foreign key constraint. This is not true for either the
i or oracle.

HTH,
Charles



On Tue, Mar 24, 2009 at 10:49 AM, Adam West <adamster@xxxxxxxxx> wrote:
Well good news, I may be back on the i soon. That wasn't too long.

The other thing is that my exp. in SQL is now largely Oracle. On the i, I was a lazy bum, using RPG and the old Query. But the new work would entail SQL Only. I was just wondering how the following is done on the i.

In Oracle.
1) A is a table with aid, field1 columns.
2) B is a table with bid, aid, field2 columns. (where bid is a foreign key from table A)

Select A.field1 , B. field2 from A inner join B
on B.aid = A.aid
where condition

Oracle join will give you error if the table entries doesnot match, the results may vary based on the type of join you are using.. (inner, left outer, right outer, full)

How is this on the i? also on the i, does the outer join have to have a foreign key in this case does the B table field need to be from the A table?

In the i, you can have a composite key where the field names don't have to match as long as they are the same type.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.