Solved

SQL select

Posted on 2014-03-20
3
294 Views
Last Modified: 2014-03-20
Hi Experts,

I have table where one column is timestamp type. I need to get rows comparing date part only of timestamp to mine 'YYYY-MM-DD'

Thanks.
0
Comment
Question by:fpoyavo
3 Comments
 
LVL 65

Expert Comment

by:Jim Horn
ID: 39942696
Give us a 'for example..' of what you're trying to pull off here.

SQL expert PortletPaul has an excellent article on SQL Server Date Styles using CONVERT(), where your answer will likely be in there somewhere.
0
 
LVL 1

Author Comment

by:fpoyavo
ID: 39943082
Hi Jim,

I tried this WHERE convert(varchar, my_tmsp ,110) = '03-20-2014'
 
and it does not work ... empty result

Thanks.
0
 
LVL 11

Accepted Solution

by:
John_Vidmar earned 500 total points
ID: 39943252
SQL Server's TIMESTAMP data-type has nothing to do with a date and/or time, it's just a binary representation of a consecutive number - it's only good for making sure a row hasn't change since it's been read.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

821 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