I have the following query
SELECT tp.Nombre,
tp.IdTipoContacto
FROM TipoContacto tp
LEFT JOIN Contacto c
on tp.IdTipoContacto = c.IdTipoContacto
WHERE NOT tp.Nombre = 'Compañia'
This brings me back
Facturacion 2
Facturacion 2
In my table TipoContacto
I only have two records that are Billing and Company in my table Contacto
I have records, several are Facturacion
, and only one of compañia
.
I want to make my query only return the remaining records of the ContactContact table when the id of compañia
already exists in the other table, otherwise list the two Facturacion
and Compañia
,
additionally in Linq
As you can see, the query brings me two equals, I would only need one in this case. Thank you
Something Additional To make me understand better:
select records, which meet the following conditions Tables: Contact, Contact Type, Client
1. if you have already made a contact with TypeContact Company, from a specified client Just list the others.
2. if there is no contact with type Company Contact, from a specific customer list all including company.