Re: convert MSSQL Query to Oracle Query

From: Justin Cave <jocave_at_yahoo.com>
Date: 16 Sep 2002 13:07:37 -0700
Message-ID: <233b7a65.0209161207.1333a543_at_posting.google.com>


shivasbhat_at_rediffmail.com (shivas) wrote in message news:<346a335.0209160554.5e2d0a58_at_posting.google.com>...
> I am a trainee programmer doing programming in delphi.
> I am getting difficulties in conversion of SQL Query to Oracle
> The Query is as follows
>
> SQL.Add('declare _at_lastinsp datetime');
> SQL.Add('select _at_lastinsp=max(inspdate) from vwnvnxin where
> systemkey= :systemkey');
> SQL.Add('select * from vwnvnxin where inspdate=_at_lastinsp and
> systemkey= :systemkey');
>
> How can I convert the above query to Oracle.

Can't you just change this to

select * from vwnvnxin where inspdate=max(inspdate) and systemkey= :systemkey

Justin Cave Received on Mon Sep 16 2002 - 22:07:37 CEST

Original text of this message