Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone... Plz Help Me
SQL
SELECT P.Id,P.regno,P.StdName, P.ClassSection,A.Standard, A.Description, A.Fee FROM Tbl_Sc_StudentProfile P INNER JOIN Tbl_Sc_Feeallocation A ON P.Standard = A.Standard AND P.compid = A.compid INNER JOIN Tbl_Com_SchoolProfile I ON A.compid = I.compid WHERE P.Deleted='No'AND P.Status='Yes' AND P.Tc='No' AND NOT EXISTS (SELECT c.description,c.class FROM Tbl_Sc_FeeCollChild c WHERE c.class = P.classsection and c.stdid = P.Id and  c.description=A.Description) GROUP BY A.Description,P.Id,P.regno,P.StdName,P.ClassSection, A.Standard , A.Fee order by Standard asc

when i execute this query with sql DB its executing

but in MS Access i'm getting the following error
Syntax error (missing operator) in query expression ''.

Plz Help me.. how to solve this...
Posted
Updated 24-Jul-12 23:30pm
v7

1 solution

Use the following query, this will help you:

SQL
SELECT
    P.Id,
    P.regno,
    P.StdName,
    P.ClassSection,
    A.Standard,
    A.Description,
    A.Fee
FROM
    Tbl_Sc_StudentProfile P, Tbl_Sc_Feeallocation A, Tbl_Com_SchoolProfile I
WHERE
    P.Standard = A.Standard
    AND P.compid = A.compid
    AND A.compid = I.compid
    AND P.Deleted='No'
    AND P.Status='Yes'
    AND P.Tc='No'
    AND NOT EXISTS (
                        SELECT
                            c.description,
                            c.class
                        FROM
                            Tbl_Sc_FeeCollChild c
                        WHERE
                            c.class = P.classsection
                            and c.stdid = P.Id
                            and c.description = A.Description
                )
GROUP BY
    A.Description,
    P.Id,
    P.regno,
    P.StdName,
    P.ClassSection,
    A.Standard,
    A.Fee
order by
    A.Standard asc
 
Share this answer
 
Comments
Raajendran 25-Jul-12 6:00am    
Thank U So Much....

I Got Solution....

Thanks alot....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900