[Last Call] Learn how to a build a cloud-first strategyRegister Now


Where Clause Julian date

Posted on 2014-08-25
Medium Priority
Last Modified: 2014-11-16
Can someone tell me who to write a where clause for a jullian date

select * from table where juliandatefield = today's date

also is there a way to convert the date from Julian date to month day year in the where clause
Question by:MPDenver
  • 2
LVL 23

Assisted Solution

David earned 664 total points
ID: 40284101
SQL> select to_date(2456143,'J') from dual;
LVL 78

Accepted Solution

slightwv (䄆 Netminder) earned 1336 total points
ID: 40284103
If juliandatefield is a varchar2:
select * from table where juliandatefield = to_char( sysdate, 'j' );

If a number:
select * from table where juliandatefield = to_number(to_char( sysdate, 'j' ));
LVL 78

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 1336 total points
ID: 40284106
It is all about the format mask when going from string/numbers to dates and back.

I would check the online docs for what is allowed in the formatting:
LVL 23

Expert Comment

by:Steve Wales
ID: 40445514
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
Suggested Courses

830 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