I dont know SQL nor nested-statements. Please provide me with the complete SQL to copy and paste into my Access query, based on my criteria and SQL below.
Thank you very much in advance, Nathaniel
criteria:
-
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);
1 Answer