on 05-26-2015 6:13 PM
HOLA FORO BUEN DIA,
TENGO UNA CONSULTA QUE ME MUESTRA TODOS LOS CONTACTOS DE UN CLIENTE.
SÓLO DESEO EL CONTACTO POR DEFAULT ME PODRIAN AYUDAR POR FAVOR.
select t1.CntctPrsn
from dbo.JDT1 T0 with(nolock) INNER JOIN
dbo.OCRD T1 with(nolock)
ON T0.shortname = T1.cardcode
and T1.cardtype = 'c'
GRACIAS.
Hola Jorge
Como indica Agustín, las tablas que debes usar son las OCRD y OCRP, y la consulta sería la siguiente:
select distinct T0.CardCode, T1.Name, T1.FirstName, T1.LastName
from OCRD T0
inner join OCPR T1 on T0.CntctPrsn = T1.Name and T0.CardCode = T1.CardCode
Slds y cuéntanos si te funcionó.
Ana Maria Mejia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola
las tablas que necesitas son OCPR y OCRD.
De la tabla OCPR tomas los datos que necesites del contacto.
La consulta es:
select T1.* from OCRD T0 inner join OCPR T1 on T0.CntctPrsn = T1.Name
Un saludo
Agustín Marcos Cividanes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola Agustin,
Muchas Gracias por tu apoyo mira esta consulta como la mia me arroja todos los contactos que tiene un SN, yo solo necesito el contacto que tiene x default.
Si el cliente tiene 50 sucursales y tiene capturado 50 contactos solo el contacto que esta por default de ese socio de negocios, no todos.
Continuo en la búsqueda.
Saludos
User | Count |
---|---|
92 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.