Oracle 10g date column

220 pts.
Tags:
Oracle 10g
Oracle 10g administration
Oracle 10g Express
Oracle administration
Hi All, In the below query VALUEDDATE is the date column and REGISTER is the table. wat is the use writing CAST(FLOOR( CAST( VALUEDDATE AS FLOAT ) )AS DATETIME) VALUE_DATE instead of simply column name ie,VALUE_DATE [hr />
query:
SELECT CAST(FLOOR( CAST( VALUEDDATE AS FLOAT ) )AS DATETIME) VALUE_DATE FROM REGISTER WHERE VALUEDDATE>'09/30/2009'
-----------------------------------------------------------------------------------------------------


Software/Hardware used:
Oracle 10 g express edition
ASKED: December 21, 2010  10:34 AM
UPDATED: December 21, 2010  3:38 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

That is not a command that would run on Oracle.

There is no DATETIME data type in Oracle, and trying to cast a date to a float would produce an error.

This is probably from SQL Server, and the goal of the command I suppose is to remove the time portion of the datetime column.

In Oracle, you could do it this way:

<pre>SELECT TRUNC(valueddate) value_date
FROM register
…</pre>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following