SQL Query

Dear Expert,

SQL Query question:
SELECT [InsertTime],[FirstName],[LastName]
FROM [Prod].[Data].[IncomingUpdate]
WHERE InsertTime IN (2011-11-12-22:33)

This will show in the database every row in the column InsertTime that have text: 2011-11-12-22:33
Now the data come in around date 2011 november 20 clock time 22:33, clock time is hard coded in the application, I can't do anything there, It would be nice if it only shows date, that however is not the case, is it possible to query 2011-11-12? I tried to put: WHERE InsertTime IN (2011-11-12) It didnt work tho.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ares KurkluSoftware EngineerCommented:
I am not sure what you are trying to get in return exactly but "In" is a bit strange usage for date comparison why don't you use

InsertTime >= '2012-11-12'
  InsertTime < '2012-11-13'

or if you need between specific time

InsertTime >= '2011-11-12 00:00:000'
 InsertTime <= '2011-11-12 23:59:000'

there are other functions that you can use as well like between and datediff

BETWEEN datediff(dd,0,'2011-11-12') AND datediff(dd,0,'2011-11-13')

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WeTiAuthor Commented:
Yes it worked, thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.