Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oracle SQL Outer Join Problem : ADO version 1.5
Message
De
03/02/1999 17:15:25
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Oracle SQL Outer Join Problem : ADO version 1.5
Divers
Thread ID:
00183656
Message ID:
00183656
Vues:
60
ADO version 1.5
Oracle Version 8



ParentTable (PrimaryKey = primkey)
ChildTable

SQL= SELECT ParentTable.*, childTable.special_field
FROM ParentTable, childtable
WHERE ParentTable.primkey=childtable.primkey (+)


The childtable is not required but there can be no child orphans.

If there are childtable records, the query returns the SQL statement correctly.

If there is NO childtable records, then the ParentTable primkey is returned as a "null". Why? How can a primkey (primary key) be returned as a "null"? This only happens on this single parent\child relationship. It does not happen for any other parent\child relationship.

Thanks!!!

The actual piece of code is:

<%
' Parent Primary Key : TCLTISS.ISS_SYS_NR
' Child Foriegn Key : TCLTRSN.ISS_SYS_NR

MYDSN="DSN=xxxxxxxxxxxxxx;UID=xxxxxx;pwd=xxxxxxxx"
MYSQL="
SELECT
TCLTISS.*,
TCLTRSN.*,
TCLIPRO.CMT_TE_SYS_NR AS SUM_CMT_SYS_NR,
TCLIREC.CMT_TE_SYS_NR AS REC_CMT_SYS_NR,
TCLFSGM.*,
TDMCMNT.CMT_TE AS SUMMARY,
VRHRGML.ARC_MDL_NR
FROM TCLTISS, TCLTRSN, TCLIPRO, TCLIREC, TCLFSGM, TDMCMNT,VRHRGML
WHERE
TCLTISS.ISS_SYS_NR = TCLIPRO.ISS_SYS_NR (+) AND
TCLIPRO.CMT_TE_SYS_NR = TDMCMNT.CMT_TE_SYS_NR (+) AND
TCLTISS.ISS_SYS_NR = TCLIREC.ISS_SYS_NR (+) AND
TCLTISS.FSG_SYS_NR = TCLFSGM.FSG_SYS_NR (+) AND
TCLFSGM.ARC_RGS_NR = VRHRGML.ARC_RGS_NR (+) AND
TCLTISS.ISS_SYS_NR = TCLTRSN.ISS_SYS_NR (+) AND
TCLTISS.RPT_CWM_PES_SYS_NR = '6'"



set conntemp=server.createobject("adodb.connection")
conntemp.open mydsn
set rstemp=conntemp.execute(mysql)


%>
Répondre
Fil
Voir

Click here to load this message in the networking platform