very much needed help...

  • I have this problem and I have yet to find a solution because I am still new in this.

    problem:

    The tables are linked in this condition 1->2->3->4

    What I need to do is to compare the id in table1 with the classid in table 4. How can I

    compare it when tables are linked this way? Can anyone help me?? i really appreciate it.

    The scenario:

    when a user click the link on an asp page where the data of table 1 is displayed, it will take them to the page where it displays the data in table 4. How do I do this?? i need to compare the id and classid but tables are linked the way i mentioned.

    thanks heaps

    eat when you can and not when you cannot.


    eat when you can and not when you cannot.

  • Can you provide more information? How are the tables linked; what are they linked on? What is the structure of each table?

    -SQLBill

  • You can use the sql similar to the following to get all the values in table 4 using key of table1

    SELECT t4.*

    FROM table4 AS t4

    JOIN table3 AS t3

    ON (t3.keys = t4.keys)

    JOIN table2 AS t2

    ON (t2.Keys = t3.keys)

    JOIN table1 AS t1

    ON (t1.keys = t2.keys)

    WHERE t1.id = <id entered by user>

  • thanks, I will try that. is it applicable if I am using it ODBC??

    SQLbill...rajesh kinda got my idea already but is this applicable?? or do I need to modify. Am going to try this,

    eat when you can and not when you cannot.


    eat when you can and not when you cannot.

  • You are asking about two different things.

    1. The query. And the solution given should work.

    2. The connection. The way you connect to the database has very little to do with the way a script works. An ODBC connection works just fine.

    -SQLBill

  • thanks sqlBill.

    \I have finally figure it out! thanks yeah!

    eat when you can and not when you cannot.


    eat when you can and not when you cannot.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply