Modifica query approvvigionamenti AURICCHIO
This commit is contained in:
@@ -87,9 +87,10 @@ FROM (
|
||||
fabb.cod_alis = venduto.cod_alis AND
|
||||
fabb.cod_art_for = venduto.cod_art_for and
|
||||
fabb.partita_mag = venduto.partita_mag
|
||||
LEFT OUTER JOIN (select origine, cod_anag, cod_vdes
|
||||
LEFT OUTER JOIN (select origine, cod_anag, cod_vdes, cod_mart
|
||||
from OLAP_RIEP_PROD_SEDI
|
||||
WHERE cod_anag is not null) trasf on fabb.partita_mag = trasf.origine
|
||||
WHERE cod_anag is not null) trasf on fabb.cod_mart = trasf.cod_mart and
|
||||
fabb.partita_mag = trasf.origine
|
||||
LEFT OUTER JOIN (select atb_forn.cod_anag,
|
||||
vtb_dest.cod_vdes,
|
||||
ISNULL(vtb_dest.cod_alis, atb_forn.cod_alis) as cod_alis
|
||||
@@ -107,4 +108,4 @@ FROM (
|
||||
ISNULL(trasf.cod_vdes, '') = ISNULL(LisaTrasf.cod_vdes, '')
|
||||
) ftLav
|
||||
WHERE 1 = 1
|
||||
ORDER BY posizione, descr_gruppo, descrizione, note
|
||||
ORDER BY posizione, descr_gruppo, descrizione, note
|
||||
|
||||
Reference in New Issue
Block a user