Basa
Enviado por meylinching • 17 de Septiembre de 2015 • Apuntes • 426 Palabras (2 Páginas) • 189 Visitas
SELECT LIBE_APO FROM basa2015
WHERE GSANG IS NULL
USE sigma_desa
SELECT*FROM codigo('TIPORESPAGO')
SELECT*FROM MO_Distrito
WHERE nombre='PACHACAMAC'
SELECT*FROM MO_Pais
SELECT*FROM MO_Provincia
WHERE nombre = 'CALLAO'
select (
case
when DOMIC like 'av%' then 14501
when DOMIC like 'jr%' then 14502
when DOMIC like '%calle%' OR DOMIC like '%cll%' OR DOMIC like '%-- Calle%' then 14503
when DOMIC like 'Alameda%' OR DOMIC like '-- Alameda%' then 14505
when DOMIC like 'Male%' then 14506
when DOMIC like 'Plaza%' then 14509
when DOMIC like 'Block%' then 14510
when DOMIC like 'Prol%' OR DOMIC like '-- Prol%' then 14511
end
),DOMIC
from basa2015
SELECT distinct apepat FROM MX_Persona
USE sigma_temp
SELECT*FROM MX_Persona
SELECT DISTINCT NOMB_CONT, NOMB_AL FROM basa2015
select lTRIM(NOMB_CONT) AS CONTACTO from basa2015
ORDER BY NOMB_CONT
Select replace(NOMB_CONT, '-','') from basa2015
ORDER BY NOMB_CONT
SELECT*FROM MX_PERSONA
select len(CODUSe) from basa2015
select len(rtrim(ltrim(NOMB_AL))),NOMB_AL from basa2015--limpiar espacios
order by len(rtrim(ltrim(NOMB_AL))) desc
--padres sin dni
select LIBE_PAD,NOMB_PAD,APAT_PAD,AMAT_PAD,CODUNI,NOMBRE_AL from basa2015
where LIBE_PAD is null
select LIBE_mAD,NOMB_mAD,APAT_mAD,AMAT_mAD,CODUNI,NOMBRE_AL from basa2015
where LIBE_mAD is null
select LIBE_PAD,nom,CODUNI,NOMBRE_AL from basa2015--1809
where LIBE_PAD is null
select * from basa2015--1809
order by NACI_PAD
select
(
select(
case
when NACI_PAD like 'per%' then 1
...