SQL

1K

Solutions

6

Articles & Videos

1K

Contributors

SQL (Structured Query Language) is designed to be used in conjunction with relational database products as of a means of working with sets of data. SQL consists of data definition, data manipulation, and procedural elements. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.

Share tech news, updates, or what's on your mind.

Sign up to Post

Can anyone explain this?

When looking for transactions based on timestamp in e.g. 2017 you can for instance do it like this:

...where timestamp >= to_date('2017','YYYY')
or
...where timestamp >=to_date('01.01.2017','DD.MM.YYYY')

Why does these two expressions return different number of transactions? In my case the latter returns appox. 8 times as many. Is this an error in Oracle SQL or is it something I have missed?

Thx!

Brgds
IVer Erling Årva, Oslo
0
 
LVL 13

Expert Comment

by:Alexander Eßer [Alex140181]
I don't think this is a bug, I suppose it's just the default behavior if you omit some time parts. I just can't find any evidence within the official docs. Maybe some other Oracle expter may help in finding that reference?!
0
 

Administrative Comment

by:South Mod
It seems this is a technical question, and therefore you should post this as a Question in the appropriate topics. The Posts feature is intended for members to share news, information, etc with others, and not to find a solution to a technical problem.
0
Back Up Your Microsoft Windows Server®
LVL 4
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

SQL PASS DBA Fundamentals mtg going on now.  Gail Shaw talking about Indexes, and her cat is talking back.  :-)  http://fundamentals.pass.org/
4
 
LVL 66

Expert Comment

by:Jim Horn
Joined.  Thanks for posting.
0

SQL

1K

Solutions

6

Articles & Videos

1K

Contributors

SQL (Structured Query Language) is designed to be used in conjunction with relational database products as of a means of working with sets of data. SQL consists of data definition, data manipulation, and procedural elements. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.