D
DawnTreader
Hello All
just curious as to the SQL results of creating a query with a union subquery:
SELECT
SQ.ProductID,
SQ.WO,
SQ.ProductSection,
SQ.IMWPNID,
dbo_PART.DESCRIPTION AS PartDesc,
dbo_PART.MFG_NAME AS Manufacturer,
dbo_PART.MFG_PART_ID AS MfgPartID,
SQ.REF,
SQ.PartBlockQTY,
SQ.PartSkidQTY,
dbo_PART.UNIT_PRICE AS UnitPrice,
nz([PartSkidQTY],0)*nz([UnitPrice],0) AS SkidValue,
tblMasterPartList.Filter,
tblMasterPartList.[1000Maint] AS Maint1000Hr,
tblMasterPartList.[5000Rebuild] AS Rebuild5000Hr,
tblMasterPartList.[10000Rebuild] AS Rebuild10000Hr,
tblMasterPartList.[15000Rebuild] AS Rebuild15000Hr,
tblMasterPartList.[20000Rebuild] AS Rebuild20000Hr,
tblMasterPartList.[25000Rebuild] AS Rebuild25000Hr,
SQ.PartListId
FROM [SELECT
ProductID,
WO,
ProductSection,
IMWPNID,
REF,
PartBlockQTY,
PartSkidQTY,
PartListId
FROM qryrptSerialPartList
UNION SELECT
qryrptCBARebuildPartList.ProductID,
qryrptCBARebuildPartList.WO,
qryrptCBARebuildPartList.ProductSection,
qryrptCBARebuildPartList.IMWPNID,
qryrptCBARebuildPartList.REF,
qryrptCBARebuildPartList.PartBlockQTY,
qryrptCBARebuildPartList.PartSkidQTY,
qryrptCBARebuildPartList.PartListId
FROM qryrptCBARebuildPartList LEFT JOIN qryrptSerialPartList ON
qryrptCBARebuildPartList.IMWPNID = qryrptSerialPartList.IMWPNID
WHERE qryrptSerialPartList.IMWPNID IS NULL]. AS SQ LEFT JOIN (dbo_PART LEFT
JOIN tblMasterPartList ON dbo_PART.ID = tblMasterPartList.ID) ON SQ.IMWPNID =
dbo_PART.ID;
it works as expected, but i am curious as to why access changed my ( )'s in
to [] 's?
just curious as to the SQL results of creating a query with a union subquery:
SELECT
SQ.ProductID,
SQ.WO,
SQ.ProductSection,
SQ.IMWPNID,
dbo_PART.DESCRIPTION AS PartDesc,
dbo_PART.MFG_NAME AS Manufacturer,
dbo_PART.MFG_PART_ID AS MfgPartID,
SQ.REF,
SQ.PartBlockQTY,
SQ.PartSkidQTY,
dbo_PART.UNIT_PRICE AS UnitPrice,
nz([PartSkidQTY],0)*nz([UnitPrice],0) AS SkidValue,
tblMasterPartList.Filter,
tblMasterPartList.[1000Maint] AS Maint1000Hr,
tblMasterPartList.[5000Rebuild] AS Rebuild5000Hr,
tblMasterPartList.[10000Rebuild] AS Rebuild10000Hr,
tblMasterPartList.[15000Rebuild] AS Rebuild15000Hr,
tblMasterPartList.[20000Rebuild] AS Rebuild20000Hr,
tblMasterPartList.[25000Rebuild] AS Rebuild25000Hr,
SQ.PartListId
FROM [SELECT
ProductID,
WO,
ProductSection,
IMWPNID,
REF,
PartBlockQTY,
PartSkidQTY,
PartListId
FROM qryrptSerialPartList
UNION SELECT
qryrptCBARebuildPartList.ProductID,
qryrptCBARebuildPartList.WO,
qryrptCBARebuildPartList.ProductSection,
qryrptCBARebuildPartList.IMWPNID,
qryrptCBARebuildPartList.REF,
qryrptCBARebuildPartList.PartBlockQTY,
qryrptCBARebuildPartList.PartSkidQTY,
qryrptCBARebuildPartList.PartListId
FROM qryrptCBARebuildPartList LEFT JOIN qryrptSerialPartList ON
qryrptCBARebuildPartList.IMWPNID = qryrptSerialPartList.IMWPNID
WHERE qryrptSerialPartList.IMWPNID IS NULL]. AS SQ LEFT JOIN (dbo_PART LEFT
JOIN tblMasterPartList ON dbo_PART.ID = tblMasterPartList.ID) ON SQ.IMWPNID =
dbo_PART.ID;
it works as expected, but i am curious as to why access changed my ( )'s in
to [] 's?