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 2008 Forums
 Transact-SQL (2008)
 how to select first records for cuurent month

Author  Topic 

attman
Starting Member

16 Posts

Posted - 2009-12-27 : 20:33:46
my query
where id in(select min(ID) from records where serino='00904041' and tarih>=convert(varchar,DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)) and tarih<convert(varchar,DATEADD(mm, DATEDIFF(mm,0,getdate()), 0))

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-27 : 23:55:53
Duplicate, locking this topic.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -