Results 1 to 3 of 3

Thread: sql help for MS SQL server 2000???

  1. #1
    Join Date
    Jul 2006
    Posts
    29

    sql help for MS SQL server 2000???

    I am having not getting idea to build a sql statement in sql server 2000, someone plzz give a glance to my attachment and help me solve it.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2004
    Posts
    502
    Maybe there's an easier way, but you can try this:

    SELECT MULT.feeName, CASE WHEN Fees.feeName IS NOT NULL THEN 'Yes' ELSE 'No' END AS [Added]
    FROM

    (SELECT feeID, feeName
    FROM tblFee
    WHERE feeType = 'Multiple') AS MULT

    LEFT JOIN

    (SELECT tblFee.feeID, tblFee.feeName
    FROM tblFee
    JOIN tblFeeDetail ON tblFee.feeID = tblFeeDetail.feeID
    JOIN tblMember ON tblMember.mID = tblFeeDetail.memID
    WHERE tblMember.mID = 1) AS Fees

    ON MULT.feeID = Fees.feeID

  3. #3
    Join Date
    Jul 2006
    Posts
    29

    it worked like a charm

    Thanks a lot man , it worked perfectly... more than that for newbie like me this kinda code is an inspiration to learn new things.. Thanks Dude..

Posting Permissions

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