I have a query which should return records irrespective of the field SHIP_METHOD_ID. The query is
select
"OePo_Item"."ITEM_ID" from
"OePo_Item","OeShipMethod","ArClient","OePo_Header","ApVendor" where
("OePo_Item"."SHIP_METHOD_ID" = "OeShipMethod"."SHIP_METHOD_ID" or
"OePo_Item"."SHIP_METHOD_ID"='' and "OePo_Item"."RCVG_STATUS"='N') and
"OePo_Item"."ITEM_CLIENT_ID" = 'CHOP' and ("OePo_Item"."ITEM_ID" between 'NUR-1435' and
'NUR-1450') and "OePo_Item"."ITEM_CLIENT_ID" = "ArClient"."CLIENT_ID" and
"OePo_Item"."PO_ID" = "OePo_Header"."PO_ID" and "OePo_Item"."VENDOR_ID" =
"ApVendor"."VENDOR_ID" and "OePo_Item"."INVOICED_COUNT"='0' order by
"OePo_Item"."ITEM_ID"
It works fine except that if the SHIP_METHOD_ID field is space, it prints that record many times. How do I get it printed only once.
Thanks
select
"OePo_Item"."ITEM_ID" from
"OePo_Item","OeShipMethod","ArClient","OePo_Header","ApVendor" where
("OePo_Item"."SHIP_METHOD_ID" = "OeShipMethod"."SHIP_METHOD_ID" or
"OePo_Item"."SHIP_METHOD_ID"='' and "OePo_Item"."RCVG_STATUS"='N') and
"OePo_Item"."ITEM_CLIENT_ID" = 'CHOP' and ("OePo_Item"."ITEM_ID" between 'NUR-1435' and
'NUR-1450') and "OePo_Item"."ITEM_CLIENT_ID" = "ArClient"."CLIENT_ID" and
"OePo_Item"."PO_ID" = "OePo_Header"."PO_ID" and "OePo_Item"."VENDOR_ID" =
"ApVendor"."VENDOR_ID" and "OePo_Item"."INVOICED_COUNT"='0' order by
"OePo_Item"."ITEM_ID"
It works fine except that if the SHIP_METHOD_ID field is space, it prints that record many times. How do I get it printed only once.
Thanks