Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: pb sqlserver to oracle

Re: pb sqlserver to oracle

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Thu, 30 Jan 2003 08:22:50 -0800
Message-ID: <3E39515A.B0ED4B02@exesolutions.com>


slashes wrote:

> Hello,
>
> I'm newbie in Oracle and I'd would like to transform my SQL Server
> statement to Oracle statement. I don't know how transform my SQl
> statement (oracle gives errors).
>
> Here is my code:
>
> IF((select count(*) from Acteurs) != 0)
> BEGIN
> select ...
> union
> select ...
> END
> ELSE
> BEGIN
> select ...
> END
>
> If anyone could help me;
>
> Thanks a lot,
>
> Jerome

One could easily speculate that you must be charged by the character for your postings as you likely gutted enough of what you are writing to make it impossible to help you. But given what you have ...

  1. You must select into a variable and test the variable

   SELECT COUNT(*)
   INTO i
  FROM acteurs;

2. IF requires a THEN

   IF some condition THEN

   ELSIF some other condition THEN

  ELSE   END IF; You never end your IF statement.

Next time you post post something with content and state your Oracle version and edition.

Also, familiarize yourself with http://tahiti.oracle.com and especially the sections on architecture and concepts. You have as much unlearning to do as learning.

Daniel Morgan Received on Thu Jan 30 2003 - 10:22:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US