Hi All
Iam new to sql coding and working with SQL 2005, I need to know how to structure my query or what I am doing wrong with my query.
I have 2 datetime fields, field1 and field2.
I need my query to return results where the number of days are within a 14 day period from field1 datetime.
My sql code :-
SELECT
NetUtil.dbo.Reports._DateCreated,
NetUtil.dbo.Reports.OriginalPolicyInceptDate,
NetUtil.dbo.Reports."_ProcessName",
( datediff(dd,NetUtil.dbo.Reports."_DateCreated",'04/01/2008 00:0:0') )
FROM
NetUtil.dbo.Reports
WHERE
(
( datediff(dd,NetUtil.dbo.Reports."_DateCreated",'04/01/2008 00:0:0') between 1 and 14)
Please can you help......
Iam new to sql coding and working with SQL 2005, I need to know how to structure my query or what I am doing wrong with my query.
I have 2 datetime fields, field1 and field2.
I need my query to return results where the number of days are within a 14 day period from field1 datetime.
My sql code :-
SELECT
NetUtil.dbo.Reports._DateCreated,
NetUtil.dbo.Reports.OriginalPolicyInceptDate,
NetUtil.dbo.Reports."_ProcessName",
( datediff(dd,NetUtil.dbo.Reports."_DateCreated",'04/01/2008 00:0:0') )
FROM
NetUtil.dbo.Reports
WHERE
(
( datediff(dd,NetUtil.dbo.Reports."_DateCreated",'04/01/2008 00:0:0') between 1 and 14)
Please can you help......