Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Best Chance...?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jay - 29 Nov 2005 20:18 GMT
Hi again,

Alright, I've been playing around with the SQL code, and I think I'm close,
but I can't seem to get over the hump.

I found an example is using a SELECT statement in the FROM clause of the SQL
statement, but Access doesn't seem to like it.  Is it not allowed in Access?  
(I'm using A97).

I tried the following:
SELECT DISTINCT temp_getTotalTestedQuantity.DTL_ITEM_NUM,
temp_getTotalTestedQuantity.DTL_AREA_NUM,
temp_getTotalTestedQuantity.ItemsReviewed,
temp_getTotalDefectQuantity.DefectsSum
FROM
(SELECT tblDetail.DTL_ITEM_NUM, tblDetail.DTL_AREA_NUM,
Sum(tblDetail.DTL_QUAN) AS ItemsReviewed
FROM tblDetail
GROUP BY tblDetail.DTL_ITEM_NUM, tblDetail.DTL_AREA_NUM)
temp_getTotalTestedQuantity,
(SELECT tblDefectCount.DC_ITEM_NUM, tblDefectCount.DC_AREA_NUM,
Sum(tblDefectCount.DC_DF_QUAN) AS DefectsSum
FROM tblDefectCount
GROUP BY tblDefectCount.DC_ITEM_NUM, tblDefectCount.DC_AREA_NUM)
temp_getTotalDefectQuantity
LEFT JOIN temp_getTotalDefectQuantity ON
(temp_getTotalTestedQuantity.DTL_AREA_NUM =
temp_getTotalDefectQuantity.DC_AREA_NUM) AND
(temp_getTotalTestedQuantity.DTL_ITEM_NUM =
temp_getTotalDefectQuantity.DC_ITEM_NUM);

No luck yet.  Any suggestions, let me know.

Thanks,
Jay
Jay - 29 Nov 2005 20:38 GMT
My mistake, I hit the wrong button, please see post titled:
Need help trying to combine queries into 1 query

Sorry,
Jay

> Hi again,
>
[quoted text clipped - 31 lines]
> Thanks,
> Jay
Tom Ellison - 29 Nov 2005 20:53 GMT
Dear Jay:

Well, Jet is not as capable as MSDE in such matters.

You should try making a separate saved query of this portion, then
referencing that portion in your larger "outer" query.

Tom Ellison

> My mistake, I hit the wrong button, please see post titled:
> Need help trying to combine queries into 1 query
[quoted text clipped - 40 lines]
>> Thanks,
>> Jay
Jay - 29 Nov 2005 21:11 GMT
Yes, that's looking more and more likely.  Chris2 seems to agree with you.

Thanks for the response.  

Jay

> Dear Jay:
>
[quoted text clipped - 49 lines]
> >> Thanks,
> >> Jay
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.