在Microsoft sql Server 2000上执行以下(完整)SQL查询时:
SELECT B.ARTIFACTTNS,B.ARTIFACTNAME,B.ARTIFACTTYPE,B.INITIALBYTES,B.TIMESTAMP1,B.FILENAME,B.BACKINGCLASS,B.CHARENCODING,B.APPNAME,B.COMPONENTTNS,B.COMPONENTNAME,B.SCAMODULENAME,B.SCACOMPONENTNAME FROM (SELECT DISTINCT A.ARTIFACTTYPE,A.ARTIFACTTNS,A.ARTIFACTNAME FROM (SELECT DISTINCT ARTIFACTTYPE,ARTIFACTTNS,ARTIFACTNAME FROM CUSTPROPERTIES WHERE PNAME = 'AcmeSystemName' AND PVALUE = 'MyRuleGroup' UNION SELECT DISTINCT ARTIFACTTYPE,ARTIFACTNAME FROM CUSTPROPERTIES WHERE PNAME = 'AcmeSystemDisplayName' AND PVALUE = 'MyRuleGroup') A,(SELECT DISTINCT ARTIFACTTYPE,ARTIFACTNAME FROM CUSTPROPERTIES WHERE PNAME = 'AcmeSystemTargetNameSpace' AND PVALUE = 'http://MyModule') B WHERE A.ARTIFACTTYPE = B.ARTIFACTTYPE AND A.ARTIFACTTNS = B.ARTIFACTTNS AND A.ARTIFACTNAME = B.ARTIFACTNAME) A,BYTESTORE B WHERE (A.ARTIFACTTYPE = 'BRG') AND A.ARTIFACTTYPE = B.ARTIFACTTYPE AND A.ARTIFACTTNS = B.ARTIFACTTNS AND A.ARTIFACTNAME = B.ARTIFACTNAME ORDER BY ARTIFACTTYPE,ARTIFACTNAME
我得到以下异常:
java.sql.sqlException: [Acme][sqlServer JDBC Driver][sqlServer] Ambiguous column name 'ARTIFACTTYPE'.
我在这里做错了什么,如何纠正?