• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 447
  • Last Modified:

How to convert this MySQL Query to SQL Server Query?

Hi,

I would like to know how to convert this MySQL Server Query:

SELECT * FROM [i]table[/i] WHERE [i]column[/i] BETWEEN DATE_SUB(curdate(), INTERVAL 8 WEEK) AND CURDATE() ORDER BY views DESC

Open in new window


To a SQL Server Query?

Thank you
0
marcoloppo
Asked:
marcoloppo
1 Solution
 
dougaugCommented:
select * from table where column between dateadd(ww, -8, getdate()) and getdate()
order by views DESC
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now