SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SQL statement help!

    i am so bad with figuring out how to use different statements to get what I want, maybe you can help.

    Here are my tables and what they contain:

    tblClaim
    - ClaimID
    - WL_Claim

    tblClaimItem
    - ClaimID
    - ProductID

    tblProducts
    - ProductID
    - Description

    Whats my statement look like? Using my WL_Claim to find my claimID to find my productID to find my description?

    adding to the complexity, not only do I need the description data, but I need to go back and display other data (which I didn't include) from the tblCLaimItem.
    Last edited by dethfire; Jun 5, 2002 at 08:53.
    Free Science Homework Help
    http://www.physicsforums.com

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mean like this?

    select ci.claimid, ci.productid, ci.othercolumn, p.description
    from tblclaimitem ci inner join tblproducts p
    on ci.productid = p.productid
    where ci.claimid in
    (select claimid
    from tblclaim
    where wl_claim like @yourvalue)
    order by ci.claimid

  3. #3
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, it worked perfectly, thank you so much, SQL is hard for me
    Last edited by dethfire; Jun 6, 2002 at 10:51.
    Free Science Homework Help
    http://www.physicsforums.com


Bookmarks

Posting Permissions

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