SHARE
TWEET

migracion clientes direccion

hussein87gabriel Jan 12th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT TOP 100 IDCLIENTEUBICACION, IDCLIENTE,
  2. (SELECT JerarquiaId FROM JerarquiaGeograficaId_TEMP WHERE ExternoId = IDCIUDAD) AS JerarquiaGeograficaId,
  3. 0 as JerarquiaOrganizacionalId,
  4. IDTIPOUBICACION, CALLEPRINCIPAL,
  5. CASE WHEN IFCALLEPRINCIPALVERIFICADA IS NULL THEN 0 ELSE IFCALLEPRINCIPALVERIFICADA END AS IFCALLEPRINCIPALVERIFICADA,
  6. NUMERACION, CALLESECUNDARIA,
  7. CASE WHEN IFCALLESECUNDARIAVERIFICADA IS NULL THEN 0 ELSE IFCALLESECUNDARIAVERIFICADA END AS IFCALLESECUNDARIAVERIFICADA,
  8. BARRIO, REFDIRECCION, POSICION, 1 AS EsHabilitado, 0 AS Eliminado,
  9. CASE WHEN REGISTRATIONDATE IS NULL THEN DATELASTUPDATE ELSE REGISTRATIONDATE END AS REGISTRATIONDATE,
  10. REGISTRATIONIDUSER, DATELASTUPDATE, IDUSERLASTUPDATE FROM [Merge.PhuyuSalud].dbo.TBL_SERVICIOS_CLIENTES_UBICACION
  11. WHERE IDCIUDAD != 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top