C
colmkav
Hi,
why does the following (1) work but (2) not work? And if possible can
you correct (2) to what it should be?
(1)
INSERT INTO tblBBIDRiskMeasureLink ( BBIdentifier, BBRiskMeasure )
SELECT BBIdentifier, "CREDITDELTA"
FROM QryBitMapRiskMeasuresCreditSEL
WHERE (BBIdentifier Not In (SELECT BBIdentifier FROM
QryBBIDRiskMeasureCreditSEL));
QryBBIDRiskMeasureCreditSEL:
SELECT BBIdentifier
FROM tblBBIDRiskMeasureLink
WHERE (BBRiskMeasure="CREDITDELTA");
QryBitMapRiskMeasuresCreditSEL:
SELECT tblSecurityInfo.BBIdentifier
FROM (tblProduct INNER JOIN tblDomain ON tblProduct.ProductName =
tblDomain.Code) INNER JOIN tblSecurityInfo ON tblDomain.DomainId =
tblSecurityInfo.ProductCodeId
WHERE (tblSecurityInfo.AddDate>[#adddate] AND
tblProduct.VaRSplitCreditSpreadLong<>"NA");
(2)
INSERT INTO tblBBIDRiskMeasureLink ( BBIdentifier, BBRiskMeasure )
SELECT BBIdentifier, "CREDITDELTA"
FROM QryBitMapRiskMeasuresCreditSEL
WHERE (BBIdentifier Not In (SELECT BBIdentifier FROM
(SELECT BBIdentifier
FROM tblBBIDRiskMeasureLink
WHERE (BBRiskMeasure="CREDITDELTA") ) ));
why does the following (1) work but (2) not work? And if possible can
you correct (2) to what it should be?
(1)
INSERT INTO tblBBIDRiskMeasureLink ( BBIdentifier, BBRiskMeasure )
SELECT BBIdentifier, "CREDITDELTA"
FROM QryBitMapRiskMeasuresCreditSEL
WHERE (BBIdentifier Not In (SELECT BBIdentifier FROM
QryBBIDRiskMeasureCreditSEL));
QryBBIDRiskMeasureCreditSEL:
SELECT BBIdentifier
FROM tblBBIDRiskMeasureLink
WHERE (BBRiskMeasure="CREDITDELTA");
QryBitMapRiskMeasuresCreditSEL:
SELECT tblSecurityInfo.BBIdentifier
FROM (tblProduct INNER JOIN tblDomain ON tblProduct.ProductName =
tblDomain.Code) INNER JOIN tblSecurityInfo ON tblDomain.DomainId =
tblSecurityInfo.ProductCodeId
WHERE (tblSecurityInfo.AddDate>[#adddate] AND
tblProduct.VaRSplitCreditSpreadLong<>"NA");
(2)
INSERT INTO tblBBIDRiskMeasureLink ( BBIdentifier, BBRiskMeasure )
SELECT BBIdentifier, "CREDITDELTA"
FROM QryBitMapRiskMeasuresCreditSEL
WHERE (BBIdentifier Not In (SELECT BBIdentifier FROM
(SELECT BBIdentifier
FROM tblBBIDRiskMeasureLink
WHERE (BBRiskMeasure="CREDITDELTA") ) ));