| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Equivalent of MSSQL TOP 1
"Gary Johnson" <gary.johnson_at_geoffreynyc.com> wrote:
>I'm writing a procedure in MSSQL to import data from the Oracle HR system to
>an MSSQL security system. I'm trying to get the date and time from the
>Oracle server to use when looking for recent changes to the Oracle data.
>I've tried:
>
>select sysdate from <database_name>.<table_name>
>
>but this seems to return a date and time for each row of <table_name>.
>MSSQL server has the TOP n qualifier. For example, in MSSQL I could write:
>
>select top 1 sysdate from <database_name>.<table_name>
>
>I was hoping someone could tell be the equivalent syntax in Oracle 8i. Or,
>if this is not the right approach, what would be a better way of obtaining
>the time at the server?
>
>Thanks in advance,
>Gary
>
For Oracle you can use:
Select sysdate from dual;
to get the current date from the Oracle server, but it will not tell you anything about the data unless you also have a field in the data record that has the last update info as a Timestamp type ( or a Date type)
hth... Received on Mon Sep 13 2004 - 15:45:44 CDT
![]() |
![]() |