pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <tfoot id='PWrO1'></tfoot>

          <bdo id='PWrO1'></bdo><ul id='PWrO1'></ul>

        <legend id='PWrO1'><style id='PWrO1'><dir id='PWrO1'><q id='PWrO1'></q></dir></style></legend>
        <i id='PWrO1'><tr id='PWrO1'><dt id='PWrO1'><q id='PWrO1'><span id='PWrO1'><b id='PWrO1'><form id='PWrO1'><ins id='PWrO1'></ins><ul id='PWrO1'></ul><sub id='PWrO1'></sub></form><legend id='PWrO1'></legend><bdo id='PWrO1'><pre id='PWrO1'><center id='PWrO1'></center></pre></bdo></b><th id='PWrO1'></th></span></q></dt></tr></i><div class="frrjrd5" id='PWrO1'><tfoot id='PWrO1'></tfoot><dl id='PWrO1'><fieldset id='PWrO1'></fieldset></dl></div>
      1. <small id='PWrO1'></small><noframes id='PWrO1'>

      2. 訪問&amp;amp;SQL Server:自日期聚合問題以來的使

        Access amp;amp; SQL Server: Number of uses since date aggregate problem - new reporting problem (solved aggregate issue)(訪問amp;amp;SQL Server:自日期聚合問題以來的使用次數 - 新報告問題(已解決聚合問題)) - IT屋-程序

        1. <tfoot id='52QKp'></tfoot>
          • <bdo id='52QKp'></bdo><ul id='52QKp'></ul>

              <tbody id='52QKp'></tbody>
            <legend id='52QKp'><style id='52QKp'><dir id='52QKp'><q id='52QKp'></q></dir></style></legend>
            <i id='52QKp'><tr id='52QKp'><dt id='52QKp'><q id='52QKp'><span id='52QKp'><b id='52QKp'><form id='52QKp'><ins id='52QKp'></ins><ul id='52QKp'></ul><sub id='52QKp'></sub></form><legend id='52QKp'></legend><bdo id='52QKp'><pre id='52QKp'><center id='52QKp'></center></pre></bdo></b><th id='52QKp'></th></span></q></dt></tr></i><div class="3jz5x7p" id='52QKp'><tfoot id='52QKp'></tfoot><dl id='52QKp'><fieldset id='52QKp'></fieldset></dl></div>

              <small id='52QKp'></small><noframes id='52QKp'>

                • 本文介紹了訪問&amp;amp;SQL Server:自日期聚合問題以來的使用次數 - 新報告問題(已解決聚合問題)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  背景:
                  我一直在嘗試簡化在我的程序中運行報告所涉及的工作.最近,我不得不提供一份工作編號列表,其中包含用于成本/收益分析的項目列表.主要是查看儀器自上次維修/校準以來的使用頻率以及任何人上次使用它的頻率.我希望將其集成到有助于生成報告的查詢中 - 但我一直在使用次數遇到各種各樣的磚墻 - 因為我希望該聚合基于儀器上次校準的日期(基于字段的在同一個查詢中).我可以讓它給我系統總使用次數 - 但它不會接受我希望它只計算自上次校準以來使用的次數的限制

                  BACKGROUND:
                  I've been trying to streamline the work involved in running a report in my program. Lately, I've had to supply a listing of job numbers an instrument has been used on with the listing of items for cost/benefit analysis. Mostly to see how often an instrument is used since it was last serviced/calibrated and the last time anyone did use it. I was looking to integrate this into the query that helps generate the report - but I keep hitting a brick wall of sorts with the number of uses - since I want that aggregate to be based on the date the instrument was last calibrated (a field based in the same query). I can get it to give me the number of uses in the system total - but it will not accept the limitation that I want it to be only counting the times used since the last time it was calibrated

                  問題:
                  嘗試在我的報告中為使用次數添加一個聚合函數,因為項目的校準遇到了不想要的結果,或者可怕的聚合丟失"錯誤(不記得確切的警告).

                  PROBLEM:
                  Attempts to put an aggregate function in my report for the number of uses since the item's calibration are met either with undesired results, or the dreaded 'aggregate missing' error (don't remember the exact warning).

                  -- 編輯添加 8/12/2011 @ 16:09 --

                  -- Edited to add 8/12/2011 @ 16:09 --

                  發現使用 Max 聚合的另一個問題是從未使用過的工具被此查詢排除.

                  An additional problem with the use of the Max aggregate has been found for instruments that have never been used being excluded by this query.

                  詳情:

                  以下是目前有效的查詢:

                  Here is the query that does work so far:

                  SELECT
                    dbo_tblPOGaugeDetail.intGagePOID,
                    dbo_tblPOGaugeDetail.strGageDetailID,
                    dbo_Gage_Master.Description,
                    dbo_Gage_Master.Manufacturer,
                    dbo_Gage_Master.Model_No,
                    dbo_Gage_Master.Gage_SN,
                    dbo_Gage_Master.Unit_of_Meas,
                    dbo_Gage_Master.User_Defined,
                    dbo_Gage_Master.Calibration_Frequency,
                    dbo_Gage_Master.Calibration_Frequency_UOM,
                    dbo_tblPOGaugeDetail.bolGageLeavePriceBlank,
                    dbo_tblPOGaugeDetail.intGageCost,
                    dbo_Gage_Master.Last_Calibration_Date,
                    dbo_Gage_Master.Next_Due_Date,
                    dbo_tblPOGaugeDetail.bolGageEvaluate,
                    dbo_tblPOGaugeDetail.bolGageExpedite,
                    dbo_tblPOGaugeDetail.bolGageAccredited,
                    dbo_tblPOGaugeDetail.bolGageCalibrate,
                    dbo_tblPOGaugeDetail.bolGageRepair,
                    dbo_tblPOGaugeDetail.bolGageReturned,
                    dbo_tblPOGaugeDetail.bolGageBER,
                    dbo_tblPOGaugeDetail.intTurnaroundDaysOut,
                    qryRCEquipmentLastUse.MaxOfdatDateEntered
                  FROM (dbo_tblPOGaugeDetail
                    INNER JOIN dbo_Gage_Master ON dbo_tblPOGaugeDetail.strGageDetailID = dbo_Gage_Master.Gage_ID)
                    INNER JOIN qryRCEquipmentLastUse ON dbo_Gage_Master.Gage_ID = qryRCEquipmentLastUse.Gage_ID
                  ORDER BY dbo_tblPOGaugeDetail.strGageDetailID;
                  

                  但我似乎無法從具有以下字段的 tblGageActivity 中匯總使用計數(生成 Count(strCustomerJobNum)):

                  But I can't seem to aggregate a count of Uses (making a Count(strCustomerJobNum)) from the tblGageActivity with the following fields:

                  strGageID
                  strCustomerJobNum
                  datDateEntered
                  datTimeEntered
                  

                  我嘗試向先前列出的查詢添加一個字段以執行 Count(strCustomerJobNum),其中 datDateEntered 與調用查詢中的 Last_Calibration_Date 匹配 - 但我收到了缺少聚合"錯誤.如果我不考慮這個條件 - 它會運行 - 但只有當它的使用次數至少為一個(遺憾的是,這根本不是我想要的)時,才會列出所有發出過的樂器.

                  I tried to add a field to the formerly listed query to do a Count(strCustomerJobNum) where datDateEntered matched the Last_Calibration_Date from the calling query - but I got the 'missing aggregate' error. If I leave this condition out - it will run - but will list every instrument ever sent out only if it's had a usage count of at least one (not what I want at all, sadly).

                  我還想確保如果我應該得到零使用計數 - 我會得到零,而不是我的預期記錄減去空結果.

                  I also want to make sure that if I should get a zero uses count - I will get a zero back instead of my expected records minus the null results.

                  我希望有人能告訴我我哪里出錯了 - 我想節省我目前在另一個程序中運行活動報告所花費的時間,每當我想生成此報告時.提前致謝,如果您需要我發布更多信息,請告訴我.

                  I hope someone out there can tell me where I am going wrong with this - I want to save the time I am currently spending running an activity report in another program whenever I want to generate this report. Thanks in advance, and let me know if you need me to post more information.

                  -- 編輯添加 08/15/2011 @ 14:41 --

                  -- Edited to add 08/15/2011 @ 14:41 --

                  我設法解決了 Max() 聚合問題,方法是創建一個純"的第一步查詢,以獲取最新日期為 qryRCEquipmentUsed 的所有工具的列表.

                  I managed to solve the Max() aggregate problem by creating a 'pure' first-step query to get a listing of all instrument with most modern date as qryRCEquipmentUsed.

                  qryRCEquipmentLastUse:

                  SELECT dbo.tblGageActivity.strGageID, Max(dbo.tblGageActivity.datDateEntered) AS datLastDateUsed
                  FROM dbo.tblGageActivity
                  GROUP BY dbo.tblGageActivity.strGageID;
                  

                  然后我創建了一個純"列表,列出了所有根本沒有使用的工具作為名為 qryRCEquipmentNeverUsed 的查詢.

                  Then I created a 'pure' listing of all instruments that have no usage at all as a query named qryRCEquipmentNeverUsed.

                  qryRCEquipmentNeverUsed:

                  SELECT dbo_Gage_Master.Gage_ID, NULL AS datLastDateUsed
                  FROM dbo_Gage_Master LEFT JOIN dbo_tblGageActivity ON dbo_Gage_Master.Gage_ID = dbo_tblGageActivity.strGageID
                  WHERE (((dbo_tblGageActivity.strGageID) Is Null));
                  

                  注意:插入 NULL 是為了第三次合并 UNION 查詢不會因為從表中檢索的字段數不匹配而失敗.

                  NOTE: The NULL was inserted so that the third combining UNION query will not fail due to a mismatch in the number of fields being retrieved from the tables.

                  最后,我創建了一個名為 qryCombinedUseEquipment 的 UNION 查詢,將兩者組合成一個列表:

                  At last, I created a UNION query named qryCombinedUseEquipment to combine the two into a list:

                  qryCombinedUseEquipment:

                  SELECT *
                  FROM qryRCEquipmentLastUse
                  UNION SELECT *
                  FROM qryRCEquipmentNeverUsed;
                  

                  使用最后一個聯合查詢將上次使用日期提供給父查詢在數據表視圖中工作,但是當在報告中調用父查詢時 - 我得到一個空白報告;因此,在正確方向上的推動仍然會受到極大的贊賞.

                  Using this last union query to feed the Last Used date to the parent query works in datasheet view, but when the parent query is called in the report - I get a blank report; so a nudge in the right direction would still be wonderfully appreciated.

                  附錄

                  與上面相同的腳本,但表別名更短(以防有人發現更清楚):

                  Same script as above, but with shorter table aliases (in case someone finds that clearer):

                  SELECT
                    gd.intGagePOID,
                    gd.strGageDetailID,
                    gm.Description,
                    gm.Manufacturer,
                    gm.Model_No,
                    gm.Gage_SN,
                    gm.Unit_of_Meas,
                    gm.User_Defined,
                    gm.Calibration_Frequency,
                    gm.Calibration_Frequency_UOM,
                    gd.bolGageLeavePriceBlank,
                    gd.intGageCost,
                    gm.Last_Calibration_Date,
                    gm.Next_Due_Date,
                    gd.bolGageEvaluate,
                    gd.bolGageExpedite,
                    gd.bolGageAccredited,
                    gd.bolGageCalibrate,
                    gd.bolGageRepair,
                    gd.bolGageReturned,
                    gd.bolGageBER,
                    gd.intTurnaroundDaysOut,
                    lu.MaxOfdatDateEntered
                  FROM (dbo_tblPOGaugeDetail gd
                    INNER JOIN dbo_Gage_Master gm ON gd.strGageDetailID = gm.Gage_ID)
                    INNER JOIN qryRCEquipmentLastUse lu ON gm.Gage_ID = lu.Gage_ID
                  ORDER BY gd.strGageDetailID;
                  

                  推薦答案

                  總結問題:

                  嘗試在我的報告中添加一個聚合函數以了解使用次數,因為項目的校準遇到了不希望的結果或可怕的聚合缺失"錯誤.

                  Attempts to put an aggregate function in my report for the number of uses since the item's calibration are met either with undesired results, or the dreaded 'aggregate missing' error.

                  解決方案:

                  我決定讓查詢單獨驅動報告 - 而不是選擇使用適當的 DLookup 和 DCount 從提供所有工具的最后使用日期的查詢中檢索最后使用的日期,以及使用自上次校準以來的儀器,分別使用上述域聚合.

                  I decided to leave the query driving the report alone - instead choosing to employ the use of DLookup and DCount as appropriate to retrieve the last used date from a query that provides the last used date of all the instruments, and the number of uses an instrument has had since it's last calibration, using the aforementioned domain aggregates respectively.

                  使用問題描述中描述的查詢,我能夠檢索所有儀器的上次使用日期.我使用 =DLookup 語句作為報表子報表上處理各種項目的文本框的來源:

                  Using the query described in the problem description, I am able to retrieve the last used date for all instruments. I used a =DLookup statement as the source for a text box on the report's subreport dealing with various items as such:

                  =IIf((DLookUp("[qryRCCombinedUseEquipment]![datLastDateUsed]","[qryRCCombinedUseEquipment]","[qryRCCombinedUseEquipment]![strGageID]=[strGageDetailID]")) Is Null Or ([bolGageReturned]=True),"",DLookUp("[qryRCCombinedUseEquipment]![datLastDateUsed]","[qryRCCombinedUseEquipment]","[qryRCCombinedUseEquipment]![strGageID]=[strGageDetailID]"))
                  

                  這允許從未使用過的項目返回 NULL 結果,該結果將顯示為一個空白文本框.

                  This allows items that have never been used to return a NULL result, which will display as a blank text box.

                  但是,使用次數不會通過使用 =DCount 進行查詢(我試過,檢索結果需要十多分鐘,如果有的話).但是,使用底層活動表,我使用了以下語句:

                  The number of uses, however, would not feed off a query using =DCount (I tried, it would take over ten minutes to retrieve results, if it ever did). However, using the underlying activity table, I used the following statement:

                  =IIf([bolGageReturned],"","Used " & DCount("[dbo_tblGageActivity]![strGageID]","[dbo_tblGageActivity]","[dbo_tblGageActivity]![strGageID] = [strGageDetailID] And [dbo_tblGageActivity]![datDateEntered]  Between [txtLastCalibrationDate] And date()") & " times since last calibration")
                  

                  它會檢索自上次校準儀器以來使用過的次數,但沒有在今天之前或之后使用過(有些工作過時了,奇怪的是).當然,這很慢(對于包含三十或四十個儀器的大型文檔,大約需要三十秒).

                  It would retrieve a number of times used since the instrument was last calibrated, but no uses that are before that or after today (some jobs are post dated, strangely). Of course, this is SLOW (about thirty seconds for a large document with thirty or forty instruments).

                  有沒有其他人對此有更好的解決方案,還是我必須承擔性能損失?如果沒有人有更好的想法,我會在五天后(8/21/2011)接受這個作為答案.

                  Does anyone else have a better solution for this, or will I have to take the performance hit? If no one has any better ideas, I will accept this as the answer after five days (8/21/2011) .

                  這篇關于訪問&amp;amp;SQL Server:自日期聚合問題以來的使用次數 - 新報告問題(已解決聚合問題)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  SQL query to get all products, categories and meta data woocommerce/wordpress(獲取所有產品、類別和元數據的 SQL 查詢 woocommerce/wordpress)
                  Can I figure out a list of databases and the space used by SQL Server instances without writing SQL queries?(我可以在不編寫 SQL 查詢的情況下找出數據庫列表和 SQL Server 實例使用的空間嗎?) - IT屋-程序員軟件開發
                  How to create a login to a SQL Server instance?(如何創建對 SQL Server 實例的登錄?)
                  How to know the version and edition of SQL Server through registry search(如何通過注冊表搜索知道SQL Server的版本和版本)
                  Why do I get a quot;data type conversion errorquot; with ExecuteNonQuery()?(為什么會出現“數據類型轉換錯誤?使用 ExecuteNonQuery()?)
                  How to show an image from a DataGridView to a PictureBox?(如何將 DataGridView 中的圖像顯示到 PictureBox?)
                  <legend id='C4RtU'><style id='C4RtU'><dir id='C4RtU'><q id='C4RtU'></q></dir></style></legend>
                  • <bdo id='C4RtU'></bdo><ul id='C4RtU'></ul>
                    • <tfoot id='C4RtU'></tfoot>

                      <small id='C4RtU'></small><noframes id='C4RtU'>

                          <tbody id='C4RtU'></tbody>
                        <i id='C4RtU'><tr id='C4RtU'><dt id='C4RtU'><q id='C4RtU'><span id='C4RtU'><b id='C4RtU'><form id='C4RtU'><ins id='C4RtU'></ins><ul id='C4RtU'></ul><sub id='C4RtU'></sub></form><legend id='C4RtU'></legend><bdo id='C4RtU'><pre id='C4RtU'><center id='C4RtU'></center></pre></bdo></b><th id='C4RtU'></th></span></q></dt></tr></i><div class="xblhxjl" id='C4RtU'><tfoot id='C4RtU'></tfoot><dl id='C4RtU'><fieldset id='C4RtU'></fieldset></dl></div>
                          1. 主站蜘蛛池模板: 航空障碍灯_高中低光强航空障碍灯_民航许可认证航空警示灯厂家-东莞市天翔航天科技有限公司 | 网络推广公司_网络营销方案策划_企业网络推广外包平台-上海澜推网络 | 钢格栅板_钢格板网_格栅板-做专业的热镀锌钢格栅板厂家-安平县迎瑞丝网制造有限公司 | 板框压滤机-隔膜压滤机配件生产厂家-陕西华星佳洋装备制造有限公司 | 冷镦机-多工位冷镦机-高速冷镦机厂家-温州金诺机械设备制造有限公司 | 刹车盘机床-刹车盘生产线-龙口亨嘉智能装备 | 气动绞车,山东气动绞车,气动绞车厂家-烟台博海石油机械有限公司 气动隔膜泵厂家-温州永嘉定远泵阀有限公司 | 成都治疗尖锐湿疣比较好的医院-成都治疗尖锐湿疣那家医院好-成都西南皮肤病医院 | 航空障碍灯_高中低光强航空障碍灯_民航许可认证航空警示灯厂家-东莞市天翔航天科技有限公司 | 网站优化公司_北京网站优化_抖音短视频代运营_抖音关键词seo优化排名-通则达网络 | 焊接烟尘净化器__焊烟除尘设备_打磨工作台_喷漆废气治理设备 -催化燃烧设备 _天津路博蓝天环保科技有限公司 | 空调风机,低噪声离心式通风机,不锈钢防爆风机,前倾皮带传动风机,后倾空调风机-山东捷风风机有限公司 | 流变仪-热分析联用仪-热膨胀仪厂家-耐驰科学仪器商贸 | 热回收盐水机组-反应釜冷水机组-高低温冷水机组-北京蓝海神骏科技有限公司 | 塑料检查井_双扣聚氯乙烯增强管_双壁波纹管-河南中盈塑料制品有限公司 | 北京公司注册_代理记账_代办商标注册工商执照-企力宝 | 亳州网络公司 - 亳州网站制作 - 亳州网站建设 - 亳州易天科技 | 盘煤仪,盘料仪,盘点仪,堆料测量仪,便携式激光盘煤仪-中科航宇(北京)自动化工程技术有限公司 | 上海宿田自动化设备有限公司-双面/平面/单面贴标机 | 亿立分板机_曲线_锯片式_走刀_在线式全自动_铣刀_在线V槽分板机-杭州亿协智能装备有限公司 | 安规_综合测试仪,电器安全性能综合测试仪,低压母线槽安规综合测试仪-青岛合众电子有限公司 | 桁架机器人_桁架机械手_上下料机械手_数控车床机械手-苏州清智科技装备制造有限公司 | 北京发电机出租_发电机租赁_北京发电机维修 - 河北腾伦发电机出租 | 电动卫生级调节阀,电动防爆球阀,电动软密封蝶阀,气动高压球阀,气动对夹蝶阀,气动V型调节球阀-上海川沪阀门有限公司 | ISO9001认证咨询_iso9001企业认证代理机构_14001|18001|16949|50430认证-艾世欧认证网 | 机床导轨_导轨板_滚轮导轨-上海旻佑精密机械有限公司 | 超声波气象站_防爆气象站_空气质量监测站_负氧离子检测仪-风途物联网 | 河南生物显微镜,全自动冰冻切片机-河南荣程联合科技有限公司 | 运动木地板价格,篮球馆体育运动木地板生产厂家_欧氏地板 | 网站建设,北京网站建设,北京网站建设公司,网站系统开发,北京网站制作公司,响应式网站,做网站公司,海淀做网站,朝阳做网站,昌平做网站,建站公司 | 铝合金线槽_铝型材加工_空调挡水板厂家-江阴炜福金属制品有限公司 | 阴离子_阳离子聚丙烯酰胺厂家_聚合氯化铝价格_水处理絮凝剂_巩义市江源净水材料有限公司 | 散热器-电子散热器-型材散热器-电源散热片-镇江新区宏图电子散热片厂家 | 杭州月嫂技术培训服务公司-催乳师培训中心报名费用-产后康复师培训机构-杭州优贝姆健康管理有限公司 | 基本型顶空进样器-全自动热脱附解吸仪价格-AutoHS全模式-成都科林分析技术有限公司 | 儋州在线-儋州招聘找工作、找房子、找对象,儋州综合生活信息门户! | 铝箔袋,铝箔袋厂家,东莞铝箔袋,防静电铝箔袋,防静电屏蔽袋,防静电真空袋,真空袋-东莞铭晋让您的产品与众不同 | 西安微信朋友圈广告投放_微信朋友圈推广_西安度娘网络科技有限公司 | 震动筛选机|震动分筛机|筛粉机|振筛机|振荡筛-振动筛分设备专业生产厂家高服机械 | 闸阀_截止阀_止回阀「生产厂家」-上海卡比阀门有限公司 | 西安展台设计搭建_西安活动策划公司_西安会议会场布置_西安展厅设计西安旭阳展览展示 |