Hint for a query

From: Efrain Lopez <tecnomaya(at)cabsagt(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Hint for a query
Date: 2011-11-04 04:37:35
Message-ID: 322305A5-94D7-443E-8955-9784261333EF@cabsagt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have this tables

Table: Contact
IdContact
First Name
Second Name
… other columns

Table: Employee
IdEmployee
IdContact, related to Contact table
… other columns

Table: Salesman
IdSaleman
IdEmployee, if salesman is employee, related to Employee table
IdContact, if salesman is not an employee, related to Contact table

I need a query

Id Salesman - Second name - First name

But I can't figure how to do it, can someone can give advise?

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Naoko Reeves 2011-11-04 04:40:07 ERROR from pg_restore - From OS X to Ubuntu
Previous Message Kurt Buff 2011-11-04 03:21:25 Re: Recommendations for SSDs in production?