Re: i need solution to this problem

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Ragnar <gnari(at)hive(dot)is>, "Penchalaiah P(dot)" <penchalaiahp(at)infics(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: i need solution to this problem
Date: 2006-06-28 11:43:55
Message-ID: 20060628114355.48693.qmail@web31806.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> > I have tables like 1) emp_table (personal_no integer (foreign key),
> > cdacno varchar (primary key),name varchar);
>
> > 2) Rank_table (rank_id varchar (primary key), rank_name varchar);
>
> > 3) Rank_date_table (rank_id (foreign key), rank_date date);
>
> > 4) Unit_table (unit_id varchar (primarykey), unit_name varchar);
>
> > 5) Personal_table (per_no varchar (primary key), pername varchar);
>
> > 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..
>
> it is not clear what the relationships are between the tables. for
> example what is the foreign key to unit_table?
>
> how does the rank connect to emp_table or personal_table?

yes. in addition to this, it seems that

emp_table references personal_table
on personal_no = per_no.

But it is not clear how this is the case when personal_no is an integer and per_no is a varchar.

Regards,

Richard Broersma Jr.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Rodrigo Sakai 2006-06-28 14:31:18 RES: Joins between int and int[]
Previous Message Ragnar 2006-06-28 07:34:09 Re: i need solution to this problem