troubleshooting Question

Select a specific datetime interval - drivin med crazy as a bat :(

Avatar of trg_dk
trg_dkFlag for Denmark asked on
Microsoft SQL Server 2005
28 Comments3 Solutions362 ViewsLast Modified:
Hi Experts

I have a table, which contains a DateTime field "dato"

I'd like to make aquery that returns the records for a specific time period - my problem is, that as soon as I use the time clause - it goes crazy as a bat... (or I do!)

Here's my query : SELECT *, convert(varchar, datotid, 103) as ts from xml_til_trg_cockpit WHERE knnr = '20081' and (datotid >= '2011/11/08 13:00:00' and datotid <= '2011/11/09 13:00:00' ) ORDER BY fragtnr;

What to do ?? Please help me out here - the sooner the better...


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 28 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 28 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros