pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
i need solution to this problem
3+ messages / 3 participants
[nested] [flat]

* i need solution to this problem
@ 2006-06-28 05:45 Penchalaiah P. <penchalaiahp@infics.com>
  2006-06-28 07:34 ` Re: i need solution to this problem Ragnar <gnari@hive.is>
  0 siblings, 1 reply; 3+ messages in thread

From: Penchalaiah P. @ 2006-06-28 05:45 UTC (permalink / raw)
  To: pgsql-sql


Hi good morning to all........



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..



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..



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......................





Thanks  &  Regards

Penchal reddy | Software Engineer          

Infinite Computer Solutions | Exciting Times...Infinite Possibilities...


SEI-CMMI level 5 | ISO 9001:2000

IT SERVICES | BPO


Telecom | Finance | Healthcare | Manufacturing | Energy & Utilities |
Retail & Distribution | Government


Tel +91-80-5193-0000(Ext:503)| Fax  +91-80-51930009 | Cell No
+91-9980012376|www.infics.com         

Information transmitted by this e-mail is proprietary to Infinite
Computer Solutions and/ or its Customers and is intended for use only by
the individual or entity to which it is addressed, and may contain
information that is privileged, confidential or exempt from disclosure
under applicable law. If you are not the intended recipient or it
appears that this mail has been forwarded to you without proper
authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at info.in@infics.com and delete this mail from
your records.





Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email from your records.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: i need solution to this problem
  2006-06-28 05:45 i need solution to this problem Penchalaiah P. <penchalaiahp@infics.com>
@ 2006-06-28 07:34 ` Ragnar <gnari@hive.is>
  2006-06-28 11:43   ` Re: i need solution to this problem Richard Broersma Jr <rabroersma@yahoo.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Ragnar @ 2006-06-28 07:34 UTC (permalink / raw)
  To: Penchalaiah P. <penchalaiahp@infics.com>; +Cc: pgsql-sql

On mið, 2006-06-28 at 11:15 +0530, Penchalaiah P. wrote:

> 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?

gnari

> 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: i need solution to this problem
  2006-06-28 05:45 i need solution to this problem Penchalaiah P. <penchalaiahp@infics.com>
  2006-06-28 07:34 ` Re: i need solution to this problem Ragnar <gnari@hive.is>
@ 2006-06-28 11:43   ` Richard Broersma Jr <rabroersma@yahoo.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Richard Broersma Jr @ 2006-06-28 11:43 UTC (permalink / raw)
  To: Ragnar <gnari@hive.is>; Penchalaiah P. <penchalaiahp@infics.com>; +Cc: 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.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-06-28 11:43 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-06-28 05:45 i need solution to this problem Penchalaiah P. <penchalaiahp@infics.com>
2006-06-28 07:34 ` Ragnar <gnari@hive.is>
2006-06-28 11:43   ` Richard Broersma Jr <rabroersma@yahoo.com>

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