Re: Identischer SQL - Befehl liefert zwei unterschiedliche Werte

From: Elmar Boye (ElmarB_at_gmx.net)
Date: 12/06/04


Date: Mon, 6 Dec 2004 14:46:56 +0100

Hallo Volker,

Volker Biedermann <volkerb_news@hotmail.com> schrieb ...
> "Elmar Boye" <ElmarB@gmx.net> schrieb:
>
>> eben weil die veraltete *= Syntax eben nicht identisch mit dem
>> ANSI-SQL JOIN ist. Die Sternchen Synatx "versagt" an den Stellen, wo
>> mehrmalig auf die äussere Tabelle zugegriffen wird (oben pub_name)
>> da eine Auswertungsreihenfolge nicht festgegelegt werden kann.
>
> *= empfinde ich nicht als veraltet, tatsächlich gibt es (non MS)
> RDBMS wo das noch viel benutzt wird. Joins (welche auch immer) kann
> ich viel intuitiver mit dieser "veralteten" Schreibweise erzeugen.

und auch dort gibts ähnliche Probleme. Und vor allem liefern diese
Implementationen unterschiedliche Ergebnisse. Sauber definiert und
portabel ist ausschliesslich die ANSI Syntax. Nachzulesen u. a. in
Joe Celko's SQL for Smarties.

Und das ANSI JOIN gehört zum SQL 92 Standard, und ist mittlerweile
auch bei Oracle etc. angekommen. Also auch da kein Grund an alten
Zöpfen zu hängen.

>> Und da die Syntax eh veraltet ist, solltest Du darauf verzichten und
>> ausschliesslich die ANSI-JOIN Syntax verwenden.
>
> Ist die "veraltete" Schreibweise nicht sogar "T-SQL"?

Von Sybase "erfunden" (als pre Microsoft) und seit SQL Server 6.5
gibts die ANSI Syntax. Das war also Zeit genug sich umzugewöhnen.
SQL Server 2005 wird voraussichtlich die alte Syntax im nativen
Modus nicht mehr akzeptieren.

Gruss
Elmar



Relevant Pages

  • Re: Buggy SQL Syntax for External File Path in Access 2007
    ... Parentheses around the sub-select are turned into square brackets ... AS Alias is Jet SQL's syntax for derived tables. ... One option you might consider is setting your database to use ANSI ... 92 SQL, which will mean that you can use the standard AS Alias ...
    (microsoft.public.access.modulesdaovba)
  • Re: Select * From clause
    ... > Is this incorrect? ... ON" syntax was indeed introduced in ANSI SQL -92. ... the "old syntax" is fully allowed in ANSI SQL-92 and thereafter. ...
    (microsoft.public.sqlserver.programming)
  • Re: Create Table in External DB
    ... but the syntax I posted is from at least the Jet 3 ... I was wrong to suggest that your SQL was 'ANSI' SQL. ... but the syntax I posted is from at least the Jet 3 era i.e. ...
    (microsoft.public.access.queries)
  • Re: Connection.Execute causes untrappable runtime error
    ... Set Recordset = Database.Execute ... If I want to do a delete or Update, I do a Database.Execute ("SQL Syntax") ... I believe that the dataenvironment is the best thing in vb6 (The program are ...
    (microsoft.public.vb.database.ado)
  • Re: Linq to Python
    ... paradigm's big idea is to use a python + SQL type syntax to access data ... Simple LINQ expressions like the one you gave map easily to Python list ... I'm not overly keen on SQL syntax: I think this sort of complex expression ...
    (comp.lang.python)