> -----Original Message-----
> From: Van [mailto:[EMAIL PROTECTED]]
> Sent: den 27 augusti 2001 11:01
> To: Jarkeborn Joacim
> Cc: [EMAIL PROTECTED]
> Subject: Re: Help about joins
> 
> 
> Jarkeborn Joacim wrote:
> > 
> > Hi,
> > I have a Oracle SQL string that contains '(+)' but when 
> running it in mySQL I get an error message saying that it's a 
> syntax error.
> > 
> > The definition in a Oracle helpfile is:
> > (+),    Indicates that the preceding column   SELECT ename, dname
> >         is the outer join column              FROM emp, dept
> >         in a join.                            WHERE dept.deptno =
> >                                                     emp.deptno (+)
> > 
> > How can I do this in mySQL?
> > 
> > Here is my SQL statement:
> > 
> --------------------------------------------------------------
> ---------
> > SELECT f.fungroupno, f.infotypeid, f.qualifierid, f.vssno, 
> f.vsscompany,
> >       f.vssgroupno, i.fromid, i.toid, i.linktype, 
> s.sectionid section,
> >       LTRIM(CONCAT( t1.text, CONCAT( ' ', CONCAT( t2.text, 
> CONCAT( '',
> >             CONCAT( t3.text, CONCAT( ' ', s.subheadtext)))))))
> >       infoelementtitle, NULL opcode, NULL optitle
> >    FROM wi_sifilter f, wi_siinfoelement i, wi_textlist t1, 
> wi_textlist t2,
> >       wi_textlist t3, wi_pisection s , wi_fevss vs
> >    WHERE f.infotypeid = 'PARTS' AND f.fungroupno LIKE '49%' AND
> >       f.qualifierid = 'PARTS-CATLG' AND f.infoelementid = 
> i.fromid AND
> >       s.sectionid = i.toid AND
> >       t1.language(+) = 'eng' AND t1.country(+) = 'US' AND
> >          t1.textid(+) = s.heading1 AND
> >       t2.language(+) = 'eng' AND t2.country(+) = 'US' AND
> >          t2.textid(+) = s.heading2 AND
> >       t3.language(+) = 'eng' AND t3.country(+) = 'US' AND
> >          t3.textid(+) = s.heading3 AND
> >       i.linktype = 'partinforef' AND
> >       vs.vssno = f.vssno AND (vs.model = 'F10' OR vs.model IS NULL)
> >    ORDER BY 6 ASC, 5 ASC, 4 ASC
> > 
> --------------------------------------------------------------
> ---------
> > 
> > Best regards
> > Joacim
> 
> Joacim:
> 
> I don't think the (+) is standard ANSI SQL and is probably 
> not necessary for
> your Oracle query.  The (+) is unnecessary.  Lose it and the 
> query will likely
> work in both Oracle and MySQL.

Unfortunately, we have a lots of SQL statements that are non standard ANSI SQL and 
more Oracle specific.
I can't remove (+) since it doesn't work either in Oracle or mySQL. It seems that I 
have to rewrite lots of SQLs ;-(


> I'm curious why you're not explicitely specifying your OUTER 
> JOIN before the
> WHERE clause which would make it a more efficient query.

I'm not that good at SQL but I will take the issue to the SQL developer.

> CONCAT() is definitely not supported in MSSQL as of 7.0, and 
> will cause you
> problems there, but that's another issue.  I'm assuming 
> you're shooting for a
> cross-sql capable application.  A thought to consider.

Yes, if the SQL statements where ANSI SQL it wouldn't be any problem to use mySQL 
instead of Oracle.
We have lots of code that are developed for Oracle and it seems that they haven't 
developed database independant SQL's. It's very stupid done.

Regards
Joacim

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to