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

x
?
Solved

Where Clause Julian date

Posted on 2014-08-25
5
Medium Priority
?
389 Views
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
0
Comment
Question by:MPDenver
  • 2
4 Comments
 
LVL 23

Assisted Solution

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

Accepted Solution

by:
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' ));
0
 
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:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements004.htm#CDEHIFJA
0
 
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.
0

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