Re: ORA-01417: a table may be outer joined to at most one other table

From: sandyb <member_at_dbforums.com>
Date: Tue, 24 Dec 2002 09:00:22 +0000
Message-ID: <2315217.1040720422_at_dbforums.com>


Thank you, I will try it out.

Originally posted by Paul Ramsteijn
> This is a multi-part message in MIME format.
> --------------E9D55AE5A21DBFB31B974FAF
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> The Oracle message is clear, whereas your SQL is hard to read.
>
> If you cannot join your tables like this pseudo code:
> select ...
> from a
> left join b (on b... =a...)
> left join c (on c... =b...)
>
> then you should try nested constructs like this pseuso code:
> select ...
> from
> ( select ...
> from a
> left join b (on b... =a...) ) c
> left join d (on d... =c...)
>
> Paul Ramsteijn.
>
> sandyb wrote:
>
> > Hi there,
> > I have the folowing query executed in QRACLE 9i. and I get
  the
> > error message: ORA-01417: a table may be outer joined to at
  most
> > one other table
> > The query:
> > select
> > DocumentTypeElement.documentTypeId as documentTypeId,
> > DocumentTypeElement.documentTypeElementId as
  documentTypeElementId,
> > DocumentTypeElement.name as name,
> > DocumentTypeElement.isMandatory,
> > DocumentElement.documentElementId,
> > Document.documentId,
> > Document.name as documentName,
> > DocumentElement.valueText,
> > DocumentElement.valueLargeText,
> > DomainElement.valueText as domainElementValueText,
> > DomainElement.valueLargeText as
  domainElementValueLargeText,
> > DomainElement.extention as domainElementExtention,
> > DocumentElement.tsCreated as tsCreated,
> > DocumentElement.userIdCreated as userIdCreated,
> > DocumentElement.tsChanged as tsChanged,
> > DocumentElement.userIdChanged as userIdChanged,
> > DocumentTypeElement.domainId,
> > DocumentTypeElement.label,
> > DocumentElement.domainElementId,
> > Domain.domainId,
> > Domain.length as Length,
> > Domain.name as domainName,
> > Domain.datatypeId as dataTypeId,
> > Domain.hasDomainValues,
> > DomainElementDomain.length as domainElementDomainLength,
> > DomainElementDomain.name as domainElementDomainname,
> > DomainElementDomain.datatypeId as domainElementDomainType,
> > DomainElement.extention as domainElementDomainExtention
> > From
> > Template, DocumentType, Document, DocumentVersion,
> > TemplateDocumentTypeElement, DocumentTypeElement,
> > DocumentElement, DomainElement, Domain as DomainElementDomain,
  Domain
> > where
> > (template.templateId = 2) and (((Document.tsStart or
  (Document.tsStart >='2002-12-23 11:08:28.0' ))
> > or (Document.tsStart >= '2002-12-23 11:08:28.0'))
> > and documentType.documentTypeId = template.documentTypeId
> > and Document.documentTypeId = DocumentType.documentTypeId
> > and Document.tsStart Document.tsEnd > SYSDATE)
> > and documentVersion.documentVersionId =
> > Document.publishingDocumentVersionId
> > and DocumentVersion.documentId = Document.documentId
> > and TemplateDocumentTypeElement.templateId (+)=
  template.templateId
> > and DocumentType.documentTypeId (+)=
  DocumentTypeElement.documentTypeId
> > and DocumentTypeElement.documentTypeElementId (+)=
> > templateDocumentTypeElement.documentTypeElementId
> > and DocumentElement.documentTypeId (+)=
> > DocumentTypeElement.documentTypeId
> > and DocumentElement.documentTypeElementId (+)=
> > DocumentTypeElement.documentTypeElementId
> > and DocumentElement.documentId (+)= Document.documentId
> > and DocumentElement.documentVersionId (+)=
> > DocumentVersion.documentVersionId
> > and DomainElement.domainId (+)= DocumentElement.domainId
> > and DomainElement.domainElementId (+)=
  DocumentElement.domainElementId
> > and DomainElementDomain.domainId (+)=
  DomainElement.domainId
> > and Domain.domainId (+)= documentTypeElement.domainId
> > order by Document.defaultOrder, Document.tsstart desc ,
> > Document.documentId,
  TemplateDocumentTypeElement.displayOrder
> > Can someone help me!
> > Friendly regards,
> > Sandy
> > --
> > Posted via
> http://dbforums.com/http://dbforums.com
>
> --------------E9D55AE5A21DBFB31B974FAF
> Content-Type: text/x-vcard; charset=us-ascii;
> name="Ramsteijn.vcf"
> Content-Transfer-Encoding: 7bit
> Content-Description: Card for Paul Ramsteijn
> Content-Disposition: attachment;
> filename="Ramsteijn.vcf"
>
> begin:vcard
> n:Ramsteijn;Paul
> x-mozilla-html:FALSE
> adr:;;;;;;
> version:2.1
> email;internet:Ramsteijn_at_yahoo.com
> fn:Paul Ramsteijn
> end:vcard
>

--------------E9D55AE5A21DBFB31B974FAF--

--
Posted via http://dbforums.com
Received on Tue Dec 24 2002 - 10:00:22 CET

Original text of this message