Re: convert MSSQL Query to Oracle Query

From: shivas <shivasbhat_at_rediffmail.com>
Date: 18 Sep 2002 02:14:42 -0700
Message-ID: <346a335.0209180114.3695a877_at_posting.google.com>


no it cannot be done.It gives an error.
select * from vwnvnxin where inspdate=max(inspdate)

                                      * 
ERROR at line 1:
ORA-00934: group function is not allowed here

thanks
shivas

jocave_at_yahoo.com (Justin Cave) wrote in message news:<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 Wed Sep 18 2002 - 11:14:42 CEST

Original text of this message