CREATE PROCEDURE [dbo].[Get1Day]
@ExchangeId int	,
@PairSymbol varchar(50),
@StartDate datetime,
@EndDate datetime

AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

SELECT [CRTD_ID]
      ,[CRTD_Period]
      ,[CRTD_FirstQuote]
      ,[CRTD_LastQuote]
      ,[CRTD_PairSymbol]
      ,[CRTD_BidOpeningValue]
      ,[CRTD_BidClosingValue]
      ,[CRTD_BidLowValue]
      ,[CRTD_BidHighValue]
      ,[CRTD_MidOpeningValue]
      ,[CRTD_MidClosingValue]
      ,[CRTD_MidLowValue]
      ,[CRTD_MidHighValue]
      ,[CRTD_DateIn],
	  [ExchangeId]
	from [CRT_Data_1Day]   
	where ExchangeId = @ExchangeId AND [CRTD_PairSymbol] = @PairSymbol  and [CRTD_DateIn] BETWEEN  @StartDate and @EndDate
RETURN 0
GO