G
g-fro
My stored procedure is below. I would like to be able to take the
delaydata.timestamp field and grab only the records during a certain
hour. How would I go about doing this? Currently I filter by Cell,
Date and User.
<************BEGIN STORED PROCEDURE *********>
ALTER PROCEDURE dbo.GetDelayData
@startDate as datetime,
@endDate as datetime,
@cell as nvarchar,
@user as nvarchar(20)
AS
SELECT *
FROM
DelayData
WHERE
(Convert(datetime,DelayData.TimeStamp) between @startdate and
(@endDate + 1))
and (DelayData.cell=@cell OR @cell='*')
and (DelayData.UserName=@user OR @user='*')
Order by Convert(datetime,DelayData.TimeStamp) ASC
<***********END PROCEDURE*******>
TimeStamp is the name of the field. I don't like the naming
conventions in this table but it is not a table created by me. I
would think this would be rather easy to do, but I haven't been able
to find any documentation on this.
Any help would be appreciated.
delaydata.timestamp field and grab only the records during a certain
hour. How would I go about doing this? Currently I filter by Cell,
Date and User.
<************BEGIN STORED PROCEDURE *********>
ALTER PROCEDURE dbo.GetDelayData
@startDate as datetime,
@endDate as datetime,
@cell as nvarchar,
@user as nvarchar(20)
AS
SELECT *
FROM
DelayData
WHERE
(Convert(datetime,DelayData.TimeStamp) between @startdate and
(@endDate + 1))
and (DelayData.cell=@cell OR @cell='*')
and (DelayData.UserName=@user OR @user='*')
Order by Convert(datetime,DelayData.TimeStamp) ASC
<***********END PROCEDURE*******>
TimeStamp is the name of the field. I don't like the naming
conventions in this table but it is not a table created by me. I
would think this would be rather easy to do, but I haven't been able
to find any documentation on this.
Any help would be appreciated.