Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Location
    UK
    Posts
    122

    Unanswered: Nameing a sub query for access to handle.

    I have been tasked with compleating this conversion asap.

    I have been removeing functions that use dlookup from the queries of an important DB.

    I have so far halved the delay time by simply makeing one of the two main problems redundant.

    Now I must use SQL to remove the other.

    What I plan is to create is a query with a subquery

    from [foo]
    where
    (
    bar bar bar
    ) ????
    join etc


    How do I refer in the join to the sub query. ie what do I call it and how do I declar that...
    Matt the Hat says: "what!?"
    A child of five could understand this! Fetch me a child of five!
    SCARY HARD CHALLENGE: http://www.dbforums.com/showthread.php?threadid=988682

  2. #2
    Join Date
    Feb 2004
    Posts
    108
    Give an alias to your subquery.

    SELECT some_cols
    FROM T1, ( SELECT FewCols FROM T2 WHERE some_cond) CondT2
    WHERE T1.ID = CondT2.SomeID

    Hope this helps.

  3. #3
    Join Date
    Sep 2003
    Location
    UK
    Posts
    122

    Talking thankyou

    That was great. I have ended up with a union query nested inside a query linked to a table and nested inside a query


    phew!
    Matt the Hat says: "what!?"
    A child of five could understand this! Fetch me a child of five!
    SCARY HARD CHALLENGE: http://www.dbforums.com/showthread.php?threadid=988682

Posting Permissions

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