Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

NATURAL FULL JOIN

4 posts in General Discussion Last posting was on 2009-08-31 15:17:58.0Z
Adam Morgan Posted on 2009-08-31 13:32:53.0Z
Sender: 7e57.4a9bcfc0.1804289383@sybase.com
From: Adam Morgan
Newsgroups: ianywhere.public.general
Subject: NATURAL FULL JOIN
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a9bd105.7e86.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 31 Aug 2009 06:32:53 -0700
X-Trace: forums-1-dub 1251725573 10.22.241.41 (31 Aug 2009 06:32:53 -0700)
X-Original-Trace: 31 Aug 2009 06:32:53 -0700, 10.22.241.41
Lines: 16
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7701
Article PK: 6745

I want to join multiple IDENTICAL tables together into a
single view. The resulting view should combine the values
from the identical columns of each table into a single
corresponding column in the view.

In postgres I just had to do a "NATURAL FULL JOIN", but
there does not seem to be an equivalent in sybase SQL.
NOTE: this is not just an outer full join. There is a
distinct difference.

Can anyone help???


(I just posted this in another grp but realized it was prob
wrong place doh).


Breck Carter [TeamSybase] Posted on 2009-08-31 14:47:51.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__breck.carter@gmail.com>
Newsgroups: ianywhere.public.general
Subject: Re: NATURAL FULL JOIN
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__breck.carter@gmail.com
Message-ID: <4jon95djpl6tbg5aln8j1ebclh4ou1fisp@4ax.com>
References: <4a9bd105.7e86.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 31 Aug 2009 07:47:51 -0700
X-Trace: forums-1-dub 1251730071 10.22.241.152 (31 Aug 2009 07:47:51 -0700)
X-Original-Trace: 31 Aug 2009 07:47:51 -0700, vip152.sybase.com
Lines: 27
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7703
Article PK: 6743

Are you looking for a UNION?

On 31 Aug 2009 06:32:53 -0700, Adam Morgan wrote:

>
>I want to join multiple IDENTICAL tables together into a
>single view. The resulting view should combine the values
>from the identical columns of each table into a single
>corresponding column in the view.
>
>In postgres I just had to do a "NATURAL FULL JOIN", but
>there does not seem to be an equivalent in sybase SQL.
>NOTE: this is not just an outer full join. There is a
>distinct difference.
>
>Can anyone help???
>
>
>(I just posted this in another grp but realized it was prob
>wrong place doh).

--
Breck Carter http://sqlanywhere.blogspot.com/

RisingRoad SQL Anywhere and MobiLink Professional Services
breck.carter@risingroad.com


Adam Morgan Posted on 2009-08-31 15:17:58.0Z
Sender: 7e57.4a9bcfc0.1804289383@sybase.com
From: Adam Morgan
Newsgroups: ianywhere.public.general
Subject: Re: NATURAL FULL JOIN
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a9be9a6.447.1681692777@sybase.com>
References: <4jon95djpl6tbg5aln8j1ebclh4ou1fisp@4ax.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 31 Aug 2009 08:17:58 -0700
X-Trace: forums-1-dub 1251731878 10.22.241.41 (31 Aug 2009 08:17:58 -0700)
X-Original-Trace: 31 Aug 2009 08:17:58 -0700, 10.22.241.41
Lines: 30
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7704
Article PK: 6747

You da man. lol thanks. It is Monday :)

> Are you looking for a UNION?
>
>
> On 31 Aug 2009 06:32:53 -0700, Adam Morgan wrote:
>
> >
> >I want to join multiple IDENTICAL tables together into a
> >single view. The resulting view should combine the
> values >from the identical columns of each table into a
> single >corresponding column in the view.
> >
> >In postgres I just had to do a "NATURAL FULL JOIN", but
> >there does not seem to be an equivalent in sybase SQL.
> >NOTE: this is not just an outer full join. There is a
> >distinct difference.
> >
> >Can anyone help???
> >
> >
> >(I just posted this in another grp but realized it was
> prob >wrong place doh).
>
> --
> Breck Carter http://sqlanywhere.blogspot.com/
>
> RisingRoad SQL Anywhere and MobiLink Professional Services
> breck.carter@risingroad.com


Adam Morgan Posted on 2009-08-31 14:28:42.0Z
Sender: 7e57.4a9bcfc0.1804289383@sybase.com
From: Adam Morgan
Newsgroups: ianywhere.public.general
Subject: Re: NATURAL FULL JOIN
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4a9bde1a.277.1681692777@sybase.com>
References: <4a9bd105.7e86.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 31 Aug 2009 07:28:42 -0700
X-Trace: forums-1-dub 1251728922 10.22.241.41 (31 Aug 2009 07:28:42 -0700)
X-Original-Trace: 31 Aug 2009 07:28:42 -0700, 10.22.241.41
Lines: 24
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7702
Article PK: 6744

here are two attempts at joins that result in twice the
columns i want. first is an left outer, second is inner.
obviously, not what i want, but i just wanted to post an
example of my results to show what i DON'T want.

1> select * from table1, table2 where table1.id =* table2.id
2> go
id value id value
----------- -------------------- -----------
--------------------
NULL NULL 2 two

(1 row affected)


1> select * from table1 left join table2 on table1.id =
table2.id
2> go
id value id value
----------- -------------------- -----------
--------------------
1 one NULL NULL

(1 row affected)