?
Solved

T-SQL convertion

Posted on 2013-05-14
2
Medium Priority
?
236 Views
Last Modified: 2013-05-14
Dear all,

We have an oracle statement here and this will will execute in MS SQL side.

"to_date('2013-04-01','YYYY-MM-DD') and to_date('2013-05-10','YYYY-MM-DD')"

but I try to run it from MS SQL and see what takes it so long time to return.

how can I convert it to t-SQL ?
0
Comment
Question by:marrowyung
  • 2
2 Comments
 
LVL 49

Accepted Solution

by:
PortletPaul earned 2000 total points
ID: 39163896
between '2013-04-01' and '2013-05-10'

is all you need in TSQL
0
 
LVL 49

Expert Comment

by:PortletPaul
ID: 39163909
I should add, if you prefer to be explicit regarding the date conversion, then you can do this instead:

between convert(date,'2013-04-01') and convert(date,'2013-05-10')

-- not sure about sql 2005, will work in 2008
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based developeā€¦
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Screencast - Getting to Know the Pipeline
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question