Inserimento della query


SELECT

wghapp.codice,

wghcli.cognome,

(select wghseg.seg_des from wghseg where wghseg.seg_cod = wghc.segmento_m) Segmento,

(select wghcan.can_des from wghcan where wghcan.can_cod = wghc.canale_v) Canale

FROM

wghapp,

wghc,

wghcli,

wghconto

WHERE

wghapp.indice = wghconto.reccam

AND wghconto.codcli = wghcli.codice

AND wghc.codice = wghcli.codice