TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prasant Jinaga
999
751
424.5k
Query of SQL Server
Jan 4 2011 8:29 AM
Hi,
When i'm using the following query the result is displaying when i'm passing @
StartDate='1/1/2011' and @EndDate='1/5/2011'
But its not displaying when i'm passing @
StartDate='12/25/2010' or any date of previous year
select
*
from
PS_MSI_LETTER_BATCH BATCH
where
(
convert
(
varchar
(
10
),
CREATED_DATETIME
,
101
)
>=
convert
(
varchar
(
10
),
@StartDate
,
101
)
and
convert
(
varchar
(
10
),
CREATED_DATETIME
,
101
)
<=
convert
(
varchar
(
10
),
@EndDate
,
101
))
But when i'm using the following query Its displaying in both the cases.i.e if i pass the previous year date or this year date.
select
*
from
PS_MSI_LETTER_BATCH
WHERE
CREATED_DATETIME
BETWEEN
'2009-12-31 03:31:25.760'
AND
'2011-01-05 03:31:25.760'
Could any one help on this???
Thanks,
Prasant
Reply
Answers (
2
)
How do i know how many instances of SQL SERVER are installed on my computer?
i create that table document i want to display as a category l