什么将替换此查询的SQL数据库到MS Access [英] What will replace this query for SQL database to MS Access

查看:104
本文介绍了什么将替换此查询的SQL数据库到MS Access的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好...请帮助我

Hi everyone... Plz Help Me

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


当我使用sql DB执行此查询时,其执行

但是在MS Access中我遇到以下错误


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...

推荐答案

使用以下查询,这将为您提供帮助:

Use the following query, this will help you:

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


这篇关于什么将替换此查询的SQL数据库到MS Access的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆