16 lines
362 B
MySQL
16 lines
362 B
MySQL
|
--any actual splits should be entered
|
||
|
--by prepending P2- or similar into the PO
|
||
|
--also need to update the SL_ECOMM table
|
||
|
--most important is not to duplicate the
|
||
|
--invoice elements
|
||
|
select
|
||
|
CUSORDREF_0,
|
||
|
count(CUSORDREF_0)
|
||
|
from PROD.SORDER SOH
|
||
|
where
|
||
|
SOH.SOHTYP_0 = 'WEB'
|
||
|
and SOH.STOFCY_0 in ('SSB','SMB')
|
||
|
group by
|
||
|
CUSORDREF_0
|
||
|
having
|
||
|
count(CUSORDREF_0) > 1
|