0
我有一個客戶端一個可怕的數據庫,我需要數從查詢結果的數量,這是如下:可怕訪問數據庫的問題
SELECT
Offices.OfficeID
, ContractsBooksCommodities.CommodityID
FROM ((((Offices
INNER JOIN tbl_Sales
ON Offices.CompanyID = tbl_Sales.CompanyID)
INNER JOIN ContractBooks
ON tbl_Sales.CompanyID = ContractBooks.CompanyID)
INNER JOIN ContractsBooksAds
ON ContractBooks.ContractNum = ContractsBooksAds.ContractNum)
INNER JOIN ContractsBooksBrands
ON ContractsBooksAds.ContractNum = ContractsBooksBrands.ContractNum)
INNER JOIN ContractsBooksCommodities
ON ContractsBooksBrands.ContractNum = ContractsBooksCommodities.ContractNum;
我怎樣才能使這個數的記錄數回?
如果您無法獲得COUNT查詢,無論出於何種原因,只要運行查詢,然後在Recordset對象上使用RecordCount屬性(請注意,您可能必須先調用MoveLast)。 http://msdn.microsoft.com/en-us/library/office/bb208624%28v=office.12%29.aspx – 2013-02-15 00:00:09