SQL Language (MOSC)

MOSC Banner

SELECT with Sysdate and format Timestamp

edited Jun 5, 2018 1:04PM in SQL Language (MOSC) 3 commentsAnswered ✓

Hello,

I am Junior in Oracle and I have a problem. I need to write a Query to get rows with function SYSDATE but date in my database is timestamp(1510614000) but DATA_TYPE is as Number. I dont know how to write this select, I would like something like that:

        SELECT * FROM user.Table WHERE DATE > sysdate- 7 days

        I tried this but didnt work :       select * from User.clientes where DATE > TO_NUMBER(TO_CHAR(sysdate - 3, '')*86400);

My database is something like that:

COLUM_NAME   DATA_TYPE                     EXAMPLE

------------------   ----------------                     ---------------

ID_CLIENT           NUMBER                             1

NAME                   VARCHAR                        CHARLEY

DATE                   NUMBER                          1510614000

1510614000= 14/11/2017 0:00:00

I appreciate help, please.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center