Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    3

    Unanswered: mutiple talbes query

    How to make sure that all the connections during mutiple talbes query are correctly placed?Are there any simple principles? I always find extra data when query between a couple of tables.

  2. #2
    Join Date
    Jan 2003
    Location
    India
    Posts
    523

    Re: mutiple talbes query

    Originally posted by RobinMaple
    How to make sure that all the connections during mutiple talbes query are correctly placed?Are there any simple principles? I always find extra data when query between a couple of tables.
    what database are u targeting?
    basically it depends on the isolation level that you have chosen.
    And keep all the queries in transaction blocks

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54

    Re: mutiple talbes query

    Originally posted by RobinMaple
    How to make sure that all the connections during mutiple talbes query are correctly placed?Are there any simple principles? I always find extra data when query between a couple of tables.
    Do you mean that after you've built a JOIN, you seem to have unwanted rows in the result set (because they slipped through the join conditions)? If that is the case, you need to check the primary keys of all of the tables involved, and make sure that you use them (if possible) for your joins.

    If you meant something else, can you give us a few hints ???

    -PatP

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: mutiple talbes query

    I find sketching a box for each table in thq query, and connecting them with lines for each join condition, helps if I am getting confused. Particularly useful when trying to follow someone else's huge query.

  5. #5
    Join Date
    Apr 2004
    Posts
    3

    Thumbs up Thank

    Thanks all! I appreciate all your help.

Posting Permissions

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