Results 1 to 2 of 2

Thread: query

  1. #1
    Join Date
    Dec 1969

    Default query

    Hi all<BR>I have a problem, I have a table called tblcompany in which the fields are id and company_name , id is a autonumber field and a PK as well, and i have another table tblfiles which has id,company_id,filelocation and dateadded. the company_id is a FK to the id field of tblcompany. the problem is this, I retrieve a list of files from tblfiles based on the dateadded and get a number of records based on the date. I get the company_id also. But what i need is the company name to be displyed instead of the id, how do i get to do that. the company name is in the tblcompany, but i&#039;m retrieveing records of tblfiles. what would be the best way to display the company name when i retrieve the records of tblfiles.<BR>all hints, clues and help will be appreciated.<BR>thanks<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: query

    SELECT C.Company_Name, F.* FROM tblFiles F <BR>INNER JOIN tblCompany C ON F.Company_ID = T.Company_ID<BR><BR>You should really do some R&D on JOINS.

Posting Permissions

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