if that is the Case then you can test this by First Finding the Records that are 16 or higher like this
CREATE TABLE #TEMP
(
FNAME VARCHAR(30),
LASTNAME VARCHAR(30),
DATE DATETIME
)
INSERT INTO #TEMP
VALUES('VUYISWA','MASEKO','1 June 2010')
INSERT INTO #TEMP
VALUES('karen','Kock','10 June 2010')
INSERT INTO #TEMP
VALUES('Theresa','Sharp','15 June 2010')
INSERT INTO #TEMP
VALUES('Levy','Themna','15 June 2010')
INSERT INTO #TEMP
VALUES('Paul','Putter','6 June 2010')
INSERT INTO #TEMP
VALUES('Ivam','Mayer','17 June 2010')
INSERT INTO #TEMP
VALUES('Sheo','Narayan','17 June 2010')
INSERT INTO #TEMP
VALUES('Sagar','Sagar','16 June 2010')
INSERT INTO #TEMP
VALUES('Kumar','Kumar','16 June 2010')
select * from #TEMP
where DATEPART(day, date) >= 16
after you got them if you want to delete them you can run this
delete #temp
where DATEPART(day, date) >= 16
Tell me if this is what you want.
Thank you for posting at Dotnetfunda
Vuyiswa Maseko
Thank you for posting at Dotnetfunda
[Administrator]
Kannan1986, if this helps please login to Mark As Answer. | Alert Moderator