Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 >= Problem in Query

Author  Topic 

khufiamalik
Posting Yak Master

120 Posts

Posted - 2008-08-26 : 03:33:20
Hello All,

I have posted a question some times ago, but i am still unable to get my answer.
Actually I have a query which uses >= sign for Date Comparison.

When I reviewed the results of that Query, I found that database ignored the sign = and it fetched only > condition records.

I just want to have any alternate by which i can get all those records which satisfy >= date condition.

I will be thankful for your cooperation
Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-26 : 03:36:02
That may be because you've time part in date field. strip of timepart and then try like below:-

WHERE DATEADD(d,DATEDIFF(d,0,Yourdatefield),0)>=value
Go to Top of Page

sunil
Constraint Violating Yak Guru

282 Posts

Posted - 2008-08-26 : 03:39:53
quote:
Originally posted by khufiamalik

Hello All,

I have posted a question some times ago, but i am still unable to get my answer.
Actually I have a query which uses >= sign for Date Comparison.

When I reviewed the results of that Query, I found that database ignored the sign = and it fetched only > condition records.

I just want to have any alternate by which i can get all those records which satisfy >= date condition.

I will be thankful for your cooperation
Thanks in advance



Duplicate post.

Did you go through links I posted in your earlier post today itself.

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=109483
Go to Top of Page
   

- Advertisement -