Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: How to Join Tables


Message #1 by =?iso-8859-1?q?jon=20matt?= <jonmath2000@y...> on Tue, 7 Jan 2003 15:50:13 +0000 (GMT)
Hi,

I have got two tables.

1)Employee Table--> Fields a)'empId' as primary key 
      b)name
       c)'Type' which is character field holds 'S' or 'W' or 'P' ETC

2)Validation Table--> Fields a)validationId as primary key
        b) empId (not foreign but same empId which is in employee Table.
        c) Stype which is 'S' related to employee table
        d) Wtype which is 'W' related to employee table
        e) Ptype which is 'P' related to employee table
One record in this table is like

validationId-->V001

 empId-->e001

 Stype-->S

 Wtype-->W

 Ptype-->P
          
Now My problem is -->

I will get validationId  and I join these two tables on empId
to get this record

validationId empId Stype Wtype Ptype
V001           e001 S         W        P


But How I will get the names Stype, wType, Ptype from employee table where validationId is this one.

 

How to join the tables????????? 

1)to get above record 
2)and all the name of the type.




---------------------------------
With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs


  Return to Index