Returning Values from Multiple Tables

Results 1 to 3 of 3

Thread: Returning Values from Multiple Tables

  1. #1
    Paul M Guest

    Default Returning Values from Multiple Tables

    I&#039m sure this is possiable, but I don&#039t know how. Can anyone help or point me in the right direction.<BR><BR>I have a query page that the user can choose 2 seperate options which return specific values from a table. No problem. What I need to able to do, is use the same variables to create a seperate SQL query on a different table.<BR>I will explain the situation if it make it&#039s clearer. when the user selects the options, It will bring back details of a specific team, I need to be able to display details of the overall Team result, as well as the indivual result that make up the result. These results are held in seperate tables.<BR><BR>Any ideas ??<BR><BR>Paul M

  2. #2
    Join Date
    Dec 1969

    Default Learn about JOIN?

    It sounds like all you need to do is use a JOIN. <BR><BR>But without seeing what the field names and types are in the two tables, and what the relationships (if any) between them are, it&#039s hard to be sure. You *probably* need something like:<BR><BR>SELECT T1.*, T2.* <BR>FROM T1, T2<BR>WHERE T1.field1 = T2.field1<BR>AND T1.field2 = T2.field2<BR>AND T2.field1 = &#039some value&#039<BR>AND T2.field2 = &#039another value&#039<BR><BR>But there are SO many possible variations on that...<BR><BR>

  3. #3
    Paul M Guest

    Default RE: Learn about JOIN?

    Thanks for that, I had just found an article on Inner Joins at the same time as you replied.<BR>This is just what I want thankyou.<BR><BR>Paul M

Posting Permissions

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