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.

Query to get Joins in user tables

3 posts in General Discussion Last posting was on 2011-11-14 17:55:15.0Z
Hemant Posted on 2011-11-11 07:19:40.0Z
Sender: 36fc.4eb7d96e.846930886@sybase.com
From: Hemant
Newsgroups: sybase.public.ase.general
Subject: Query to get Joins in user tables
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ebccc8c.109f.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Nov 2011 23:19:40 -0800
X-Trace: forums-1-dub 1320995980 10.22.241.41 (10 Nov 2011 23:19:40 -0800)
X-Original-Trace: 10 Nov 2011 23:19:40 -0800, 10.22.241.41
Lines: 22
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30668
Article PK: 73558

Hi All,

I need your help.

How can i get the joins between two tables using sybase
system tables.

For Example :
Table A ( a_name , a_id , a_last )
Table B ( a_dep , a_depid , a_id )

Now i want to write the query that will get the Joins
between Table A and B

i.e. A.a_id = B.a_id ( i want to get this using query )


Please let me know how can i write the query to achieve the
above.


Thanks you all in Advance!!!!


Rob V Posted on 2011-11-11 10:45:43.0Z
From: Rob V <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Reply-To: rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
Organization: Sypron BV
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Query to get Joins in user tables
References: <4ebccc8c.109f.1681692777@sybase.com>
In-Reply-To: <4ebccc8c.109f.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ebcfcd7@forums-1-dub>
Date: 11 Nov 2011 02:45:43 -0800
X-Trace: forums-1-dub 1321008343 10.22.241.152 (11 Nov 2011 02:45:43 -0800)
X-Original-Trace: 11 Nov 2011 02:45:43 -0800, vip152.sybase.com
Lines: 49
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30670
Article PK: 73557


On 11-Nov-2011 08:19, Hemant wrote:
> Hi All,
>
> I need your help.
>
> How can i get the joins between two tables using sybase
> system tables.
>
> For Example :
> Table A ( a_name , a_id , a_last )
> Table B ( a_dep , a_depid , a_id )
>
> Now i want to write the query that will get the Joins
> between Table A and B
>
> i.e. A.a_id = B.a_id ( i want to get this using query )
>
>
> Please let me know how can i write the query to achieve the
> above.
>
>
> Thanks you all in Advance!!!!

You need to understand the relations between the tables. This depends on
the data model in your system -- do not expect us to know what the data
model in your system looks like. You need to find someone who has this
information, or some documentation about your system (for example, an
entity-relationship diagram showing the structure in your data model).

--
HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
and Replication Server 15.0.1/12.5 // TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks& Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


Sukhesh Posted on 2011-11-14 17:55:15.0Z
From: "Sukhesh" <sukheshnair@yahoo.com.sg>
Newsgroups: sybase.public.ase.general
References: <4ebccc8c.109f.1681692777@sybase.com>
Subject: Re: Query to get Joins in user tables
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3664
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3664
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ec15603@forums-1-dub>
Date: 14 Nov 2011 09:55:15 -0800
X-Trace: forums-1-dub 1321293315 10.22.241.152 (14 Nov 2011 09:55:15 -0800)
X-Original-Trace: 14 Nov 2011 09:55:15 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30684
Article PK: 73576

Can you elaborate? Your question does not reflect exactly what your
requirement is.

You seem to want to automate some query which queries system tables and
automatically makes joins between user tables. I don;t think you can do
that!!!

Regards
Sukhesh

<Hemant> wrote in message news:4ebccc8c.109f.1681692777@sybase.com...
> Hi All,
>
> I need your help.
>
> How can i get the joins between two tables using sybase
> system tables.
>
> For Example :
> Table A ( a_name , a_id , a_last )
> Table B ( a_dep , a_depid , a_id )
>
> Now i want to write the query that will get the Joins
> between Table A and B
>
> i.e. A.a_id = B.a_id ( i want to get this using query )
>
>
> Please let me know how can i write the query to achieve the
> above.
>
>
> Thanks you all in Advance!!!!