pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Aaron Bono <postgresql@aranya.com>
To: Penchalaiah P. <penchalaiahp@infics.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: can any one solve this problem
Date: Thu, 29 Jun 2006 10:30:39 -0500
Message-ID: <bf05e51c0606290830t4012bd8dl596e8159cb6b19ac@mail.gmail.com> (raw)
In-Reply-To: <A70AE049E81A6A40879D5DC0AC8C38C9068F9480@venus.infics.com>
References: <A70AE049E81A6A40879D5DC0AC8C38C9068F9480@venus.infics.com>

I suggest you give a first stab at it and show us what you are doing.  That
would help us see your table relationships better (please use inner/outer
joins to make it clearer) and get a better idea of what you are trying to
do.

Also, providing data examples like some of the other posts really help us
help you get a good solution.

-Aaron

On 6/29/06, Penchalaiah P. <penchalaiahp@infics.com> wrote:
>
>  emp_table(
>
> Cdacno varchar (7) (primary key),
>
> Personal_No varchar (10)(foreign key),
>
> Name varchar (40));
>
>
>
> personal_table (
>
> Personal_No varchar (10) (primary key),
>
> Cdacno varchar (7),
>
> Date_Of_Birth date);
>
>
>
> unit_master (
>
> Unit id varchar (10) (primary key),
>
> Unit_Name varchar(25),
>
> Unit_Location varchar(25));
>
>
>
> Unit_Details_table (
>
>  Unit_id varchar (foreign key)
>
> CDA_No varchar(7) foreign key);
>
>
>
> rank_table(
>
> Rank_ID numeric(2)(primary key),
>
> Rank_Code numeric(2),
>
> Rank_Name varchar (25));
>
>
>
> Rank_Date_table (
>
>   Rank_Date__ID numeric NOT NULL,
>
>   CDA_No varchar(7) (foreign key),
>
>   Rank_ID numeric(2));
>
>
>
> My query is ….if I give cdacno I have to get per_no from personal_table..
> With this I have to display rank_name from rank_table ,name from emp_table,
> unit_name from unit_master..
>
>
>
> Like that if I give per_no I have to get cdacno from emp_table.. .. With
> this I have to display rank_name from rank_table ,name from emp_table,
> unit_name from unit_master..
>
>
>
> And here unit_name is depends on unit_details_table ..and rank_name is
> depends on rank_date_table..
>
>
>
> Doing these things first it has to check when we r giving cdacno.. whether
>  per_no is null or not.. like this if I give per_no it has to check cdacno
> is null or not.
>
>
>
> Let me know the solution..
>
> But I written one function to this to get per_no if I give cdacno………………….
>

view thread (2+ messages)

Message-ID: <bf05e51c0606290830t4012bd8dl596e8159cb6b19ac@mail.gmail.com>
Permalink:  ../bf05e51c0606290830t4012bd8dl596e8159cb6b19ac@mail.gmail.com/
Also on:    postgresql.org/message-id/bf05e51c0606290830t4012bd8dl596e8159cb6b19ac@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: postgresql@aranya.com, penchalaiahp@infics.com
  Subject: Re: can any one solve this problem
  In-Reply-To: <bf05e51c0606290830t4012bd8dl596e8159cb6b19ac@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox