Relational Database

Results 1 to 2 of 2

Thread: Relational Database

  1. #1
    Daniel Guest

    Default Relational Database

    Ok. I have two tables in a Access database.<BR>Three records are in a database.<BR>ID in "Department" table is connected with<BR>Department field in "Employee" table.<BR>Now, when I connect to this database and open a recordset<BR>for Employee table and print the records out,<BR>it prints 1 or 2 for Department field, instead of<BR> "IS" or "Engineering". How should I print the corresponding<BR>information in a relational databases?<BR>Thanks bunch!!<BR><BR> --Employee Table--<BR>**************************************<BR>ID Name Department Extension<BR>************************************* *<BR>1 Dan 1 1234<BR>2 Mike 2 1233<BR>3 Nick 1 1555<BR><BR><BR>--Department Table--<BR>******************<BR>ID Department<BR>******************<BR>1 IS<BR>2 Engineering

  2. #2
    Join Date
    Dec 1969

    Default RE: Relational Database

    i&#039m assuming there is another foreign key (not in diagram) relationship to &#039relate&#039 the departments (ie., departmentid)? on that assumption:<BR><BR>SELECT,, e.extension, d.departmentname<BR>FROM employee e, department d<BR>WHERE e.departmentid = d.departmentid<BR>ORDER BY d.departmentname,<BR><BR>hope that helps. :)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts