dbTalk Databases Forums  

Outer/Inner joins

comp.databases.sybase comp.databases.sybase


Discuss Outer/Inner joins in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Zia
 
Posts: n/a

Default Outer/Inner joins - 01-28-2004 , 10:49 PM






Hi All,

I a have set of four tables as follows

CORE_ADM with columns (CID,RMO, CA1 CA2)
CORE_DATA with columns(CID,CMO,CD1,CD2)

RAN_ADM with coulmns (RID, RMO, RA1, RA2)
RAN_DATA with coulmns (RID,RMO,RD1,RD2)

in a database called COREDB.

i would like to have a view in another database BDB in such a way that
RAN_DATA and CORE_DATA has to get concatenated with respect to
coulmns.
RAN_VIEW with columns (RID,RMO,RD1,RD2,CD1,CD2)

Joins are
1. Columns CID will match
2. RMO will match
3. RID will match

Conditions are
1. All the rows from RAN_DATA whether there is data or not in
CORE_DATA
2. If there are more rows in CORE_DATA only rows corresponding to
RAN_DATA has to be considered.

I tried with outer/inner joins , it is always resulting in duplicate
entries.

Thanks and BR.//
-Zia

Reply With Quote
  #2  
Old   
Daniel Morgan
 
Posts: n/a

Default Re: Outer/Inner joins - 01-28-2004 , 11:21 PM






Zia wrote:

Quote:
Hi All,

I a have set of four tables as follows

CORE_ADM with columns (CID,RMO, CA1 CA2)
CORE_DATA with columns(CID,CMO,CD1,CD2)

RAN_ADM with coulmns (RID, RMO, RA1, RA2)
RAN_DATA with coulmns (RID,RMO,RD1,RD2)

in a database called COREDB.

i would like to have a view in another database BDB in such a way that
RAN_DATA and CORE_DATA has to get concatenated with respect to
coulmns.
RAN_VIEW with columns (RID,RMO,RD1,RD2,CD1,CD2)

Joins are
1. Columns CID will match
2. RMO will match
3. RID will match

Conditions are
1. All the rows from RAN_DATA whether there is data or not in
CORE_DATA
2. If there are more rows in CORE_DATA only rows corresponding to
RAN_DATA has to be considered.

I tried with outer/inner joins , it is always resulting in duplicate
entries.

Thanks and BR.//
-Zia
Three possiblities:

1. You don't understand your data
2. The data is corrupt
3. Bad SQL

As you didn't include any SQL ... I'll guess #3.

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
http://www.outreach.washington.edu/e...oa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.