我有两个相同列的表。我正在尝试删除table2'600_LONDON_NUMBER'中的行,这些行位于table2'600_LONDON_NUMBER1'中。下面是我的查询,但当我运行它时,MS Access说“无法从指定的表中删除”。请帮忙
15 <nil>
P.S。当我为同一个查询运行DELETE [600_LONDON_NUMBER].*
FROM 600_LONDON_NUMBER INNER JOIN 600_LONDON_NUMBER1
ON ([600_LONDON_NUMBER].GFCID = [600_LONDON_NUMBER1].GFCID) AND ([600_LONDON_NUMBER].CUSTBaseNO = [600_LONDON_NUMBER1].[CUST Base NO]);
语句时,它会在没有任何问题的情况下重新检索数据。我还检查了数据不是SELECT
我可以使用简单的readonly
查询删除。
答案 0 :(得分:1)
您可以使用DELETE 600_LONDON_NUMBER.* FROM 600_LONDON_NUMBER
WHERE EXISTS (
SELECT 1 FROM 600_LONDON_NUMBER1
WHERE [600_LONDON_NUMBER].GFCID = [600_LONDON_NUMBER1].GFCID) AND
[600_LONDON_NUMBER].CUSTBaseNO = [600_LONDON_NUMBER1].[CUSTBaseNO]
)
来解决它
from cherrypy.lib import auth_digest
USERS = {'jon': 'secret'}
conf = {
'/protected/area': {
'tools.auth_digest.on': True,
'tools.auth_digest.realm': 'localhost',
'tools.auth_digest.get_ha1': auth_digest.get_ha1_dict_plain(USERS),
'tools.auth_digest.key': 'a565c27146791cfb'
}
}
cherrypy.quickstart(myapp, '/', conf)