Solved

SQL select

Posted on 2014-03-20
3
280 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now