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: can someone please check my sql ??

Re: can someone please check my sql ??

From: Mike Burden <mburden_at_uk.att.com>
Date: Mon, 20 Sep 1999 23:08:58 +0100
Message-ID: <37E6B07A.E907E00D@uk.att.com>


Not valid Oracle SQL. Looks more like Access or I presume SQL server SQL.

Below may work (I've done it really quicky so it may not).

Inner Joins are just commas and the join predicates move down into the where clause.

Try

SELECT INV.INV_SYSTEM.SYS_NAME, INV.INV_EUP_AUFSYS_V.ES_AUF_ID, INV.INV_SYSPAR.SP_VALUE FROM INV.INV_SYSTEM,INV.INV_EUP_AUFSYS_V, INV.INV_SYSPAR
WHERE
(((INV.INV_EUP_AUFSYS_V.ES_AUF_ID)=[MIG_ID:]) AND ((INV.INV_SYSPAR.SP_VALUE) LIKE "ts01%"))

AND INV.INV_SYSTEM.SYS_ID =
INV.INV_EUP_AUFSYS_V.ES_NEW_SYS_ID AND INV_EUP_AUFSYS_V.ES_NEW_SYS_ID = INV.INV_SYSPAR.SP_SYS_ID ; Best of luck

Mike Burden

OEM wrote:

> hi
>
> could any sql oracle guru out there please help me out of this misery and
> tell me if he/she sees any error in the following sql statement:
>
> SELECT INV.INV_SYSTEM.SYS_NAME, INV.INV_EUP_AUFSYS_V.ES_AUF_ID,
> INV.INV_SYSPAR.SP_VALUE FROM (INV.INV_SYSTEM INNER JOIN
> INV.INV_EUP_AUFSYS_V ON INV.INV_SYSTEM.SYS_ID =
> INV.INV_EUP_AUFSYS_V.ES_NEW_SYS_ID) INNER JOIN INV.INV_SYSPAR ON
> INV_EUP_AUFSYS_V.ES_NEW_SYS_ID = INV.INV_SYSPAR.SP_SYS_ID WHERE
> (((INV.INV_EUP_AUFSYS_V.ES_AUF_ID)=[MIG_ID:]) AND
> ((INV.INV_SYSPAR.SP_VALUE) LIKE "ts01%"));
>
> I should use this to connect via ODBC on NT to a oracle 7 db
> but I always get strange errors like "missing key SELECT STATEMENT" and
> such stuff.
>
> Do you think the command is compatible with oracle the way it is written
> now ?
>
> thanks a lot in advance,
>
> andrew
Received on Mon Sep 20 1999 - 17:08:58 CDT

Original text of this message

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