USE [SISTEST] GO /****** Object: View [dbo].[vv_PartnerConnectionInfoAged] Script Date: 05/18/2012 09:19:05 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE view [dbo].[vv_PartnerConnectionInfoAged] as select t1.Oid Oid, t1.CustomersFrom CustomersFrom, t1.Customers Customers, t1.PartnerType PartnerType, t1.ConnectInfo ConnectInfo, t2.DocumentNumber DocumentNumber, t2.RegistryNumber RegistryNumber, t1.DateExecution DateExecution, t1.DatePayment_Account DatePayment, t1.CurrencyName_Account CurrencyName_Account, t1.AmountHUF_Account AmountHUF, t1.AmountDEV_Account AmountDEV, t1.BallanceHUF BallanceHUF, t1.BallanceDEV BallanceDEV, t1.InvoiceHeader InvoiceHeader from PCIDetail t1 join vv_PartnerConnectionInfoAccount t2 on t1.CustomersFrom=t2.CustomersFrom and t1.Customers=t2.Customers and t1.PartnerType=t2.PartnerType and t1.ConnectInfo=t2.ConnectInfo GO