We help IT Professionals succeed at work.

SQL syntax - delete rows

joaotelles
joaotelles used Ask the Experts™
on
Hi,

I need a SQL for the following: (Oracle 10g)

I have the following table:

mm_httost_ret

Inside this table I have the following:
INSTANCE                      VARCHAR2(6 BYTE)
BROKER                              VARCHAR2(32 BYTE)
ENDPOINT                      VARCHAR2(32 BYTE)
SOURCETAMP      VARCHAR2(20 BYTE)
DATA                              VARCHAR2(256 BYTE)


The column SOURCETAMP is like this:  (from the first one to the latest one)
1307114801794
1307114808751
.
.
.
1312825888069
1312825885886
1312825883843
1312825880505

So I need to delete ALL rows from this table BEFORE the number 1312825636117

NOTE: these numbers are crescent.

What would be the best way to do it?

Tks,
Joao
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
DELETE FROM mm_httost_ret WHERE SOURCETAMP*1 < 1312825636117

Author

Commented:
Tks