USE $(DATA_BASE_NAME);
GO

DROP VIEW [dm].[vwDartRequestDataSourceReport]
GO

/****** Object:  View [dm].[vwDartRequestDataSourceReport]    Script Date: 2/24/2016 1:58:21 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

Create view [dm].[vwDartRequestDataSourceReport]
as

select req.TrackingNumber, ds.Name, ds.Description, ds.DomainName
from hib.Request req 
       left join Hib.researchstudydatasource rsds on req.ID = rsds.researchstudyid
       left join hib.DataSource ds on rsds.datasourceid = ds.ID


GO
