Crear vista de NPCATPRE
De CidesaWiki
(Diferencias entre revisiones)
Pablosilva (Discusión | contribuciones)
(New page: create or replace view npcatpre as (select rpad(substr(a.codpre,1,b.longitud),32,' ') as codcat,max(upper(trim(nompre))) as nomcat from cpdeftit a, (select sum(lonniv+1)-1 as longitud from...)
Edición más nueva →
(New page: create or replace view npcatpre as (select rpad(substr(a.codpre,1,b.longitud),32,' ') as codcat,max(upper(trim(nompre))) as nomcat from cpdeftit a, (select sum(lonniv+1)-1 as longitud from...)
Edición más nueva →
Revisión de 18:50 27 nov 2008
create or replace view npcatpre as (select rpad(substr(a.codpre,1,b.longitud),32,' ') as codcat,max(upper(trim(nompre))) as nomcat from cpdeftit a, (select sum(lonniv+1)-1 as longitud from cpniveles where catpar='C') b where length(rtrim(a.codpre))=b.longitud group by substr(a.codpre,1,b.longitud))