【发布时间】:2012-06-01 21:58:34
【问题描述】:
我不知道 SQL 也不知道嵌套语句。请根据我的条件和下面的 SQL 向我提供完整的 SQL 以复制并粘贴到我的 Access 查询中。 非常感谢你,纳撒尼尔
标准:
if [POsoI].[PO_number]is like "*H", THEN [o].[SERVICE ID] must be equal to "HEAT TREAT"IF [POsoI].[PO_number] is like "*C", THEN [o].[SERVICE ID] must be equal to "COATING" or equal to "ZINC PLATING"IF [POsoI].[PO_number] is like "*G", THEN [o].[SERVICE ID] must be equal to "GRINDING"-
IF [POsoI].[.[PO_number] isnt like "*H" or like "*C" or like "*G", then [o].[SERVICE ID] must not be null and can not be equal to "HEAT TREAT" and can not be equal to "COATING" and can not be equal to"ZINC PLATING" and can not be equal to "GRINDING"SELECT DISTINCT o.SERVICE_ID FROM tbl_PO_service_order_input AS POsoI INNER JOIN SYSADM_OPERATION AS o ON (o.WORKORDER_LOT_ID = POsoI.WO_lot_ID) AND (POsoI.wo_Base_ID = o.WORKORDER_BASE_ID);
【问题讨论】:
-
@Michael Petrotta:很棒的评论 :-)
-
感谢您的建议,但很遗憾,我没有 21 天的时间来学习。
-
不需要 21 天,这些标准是基本条件
标签: ms-access