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: <Jiri.Felcman_at_noofs.abb.no>
Date: Tue, 21 Sep 1999 10:03:33 GMT
Message-ID: <7s7l5g$24a$1@nnrp1.deja.com>


In article <MPG.1250cc1acf4f2a0d989680_at_news.spectraweb.ch>,   andrew_at_baselbiet.ch (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

I can see that you like ACCESS, don't you - but you can't use ACCESS query language for other DB engines using standard SQL:

try following:

SELECT	T1.SYS_NAME,
	T2.ES_AUF_ID,
	T3.SP_VALUE
FROM
INV.INV_SYSTEM 		T1,
INV.INV_EUP_AUFSYS_V	T2,
INV.INV_SYSPAR		T3
WHERE	T1.SYS_ID	= T2.ES_NEW_SYS_ID
   AND	T3.SP_SYS_ID  	= T2.ES_NEW_SYS_ID
   AND  T2.ES_AUF_ID    = 'SOME VALUE'
   AND  T3.SP_VALUE	LIKE  'ts01%';

Do not forget to change 'SOME_VALUE'

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Sep 21 1999 - 05:03:33 CDT

Original text of this message

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