I have this view from 2 tables:
create view db1
as
SELECT
p.pr_id
,p.PlotArea
,p.OwnershipTitle
,p.Price
,p.NotaryCosts
,p.AgentFee
,p.CtrNO
,isnull(p.Price,0)-isnull(a.Price,0) as Diferente
,isnull(p.Price,0)+isnull(p.NotaryCosts,0)+isnull(p.AgentFee,0) as TotalCosts
FROM nbProcuri p
left JOIN nbAchizitii a
ON p.PlotArea = a.PlotArea
where p.CtrNO=0
In both tables I have a column named CtrNo and one called PlotArea.
I want the view to not display records when p.PlotArea=a.PlotArea and p.CtrNo=a.CtrNo and to display all other situations.
Thanks!
try this: