convert a query from access to sql server 2005

10 pts.
Tags:
Microsoft Access
SQL Server 2005
Ive recently been given the task of converting an application from an Access database to sql server 2005. One of the queries has this on the ORDER BY Clause ORDER BY not isdate(Obsolete), not isdate(not_relevant), isdate(assessed), isdate(published), isdate(implemented), not locally_adapted, guidanceType DESC, nice_ref DESC this wont work on sql server. Locally_adpated is a bit column and I assume you cant order by bit columns. Can anyone give me some pointers for conversion ?

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can order by any column that you wish.

In SQL Server the syntax of ORDER BY is like this.

SELECT *
FROM Table
ORDER BY Col1 ASC, Col3 DESC

All data types use the same syntax.

I assume that the ORDER BY would look something like this.

ORDER BY isdate(Obsolete) DESC, isdate(not_relevant) DESC, isdate(assessed), isdate(published), isdate(implemented), locally_adapted DESC, guidanceType DESC, nice_ref DESC

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following