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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Transfering bulk data

Author  Topic 

ravimohan_08
Starting Member

1 Post

Posted - 2004-08-12 : 09:51:07
Hi friends,
i am having an issue can any one help me to solve.

this is the thing.

from the sql server database i want to take only the last 2 r 3 months data from the database form the current date.

can any one give me a solution.

thanks & regards,
ravi

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-12 : 10:22:04
is this what you want??

select * from MyTable where dateCol < dateadd(m, -3, getdate())

lookup dateadd in BOL (Books Online)

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page
   

- Advertisement -