Announcement

Collapse
No announcement yet.

ORACLE 8.0.6 - ORDER BY

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ORACLE 8.0.6 - ORDER BY

    Hallo!

    Ich habe ein Problem mit ORAcle 8.0.6.

    Wie kann ich in einem View erreichen, daß nach einer bestimmten Spalte sortiert wird? ORDER BY funktioniert bei ORACLE 8.0.6 nicht oder?

    Danke für Antworten

    Gruß

  • #2
    doch, order by muß funktionieren. Welche Fehlermeldung gibts denn?

    Gruß

    Fran

    Comment


    • #3
      ORDER BY b.indizierung
      *
      ORA-00933: SQL command not properly ended

      Nach meiner Information funktioniert ORDER BY bei 8.0.6, aber nicht bei Views.

      Danke für die schnelle Antwort, hoffe Sie können mir weiterhelfen.

      Danke nochmal. Ist echt wichtig.

      Gruß
      Tobia

      Comment


      • #4
        Hallo,

        kannst du mal das ganze Statement angeben?? Hab ich noch nie gehoert, dass ein VIEW kein ORDER BY unterstuetzt. Die Fehlermeldung deutet auch eher darauf hin, dass da an der Syntax was nicht stimmt. Das mit dem Attributnamen tabelle.attr im Order by kann problematisch sein. Besser ist glaub ich ein alias fuer das Attribut in der SELECT-Liste zu verwenden.
        Wenn b.indizierung z.B. das 2 Attribut in der SELECT-Liste ist, kannst du auch ORDER BY 2 schreiben. Probier mal, ob das geht.

        Gruss

        Stefa

        Comment


        • #5
          ....nach meiner Information....
          ? Woher ist die?

          Ich glaube das muß gehen. Genau wie Stefan sagt würde ich es über die At.-Nummer probieren (auch wenns unschön ist.) Außerdem mal ein ; am Ende ausprobieren.

          Wie läuft es denn wenn Du die View ohne Order erstellst und dann SELECT * FROM View order by.... machst ?

          VG
          Fran

          Comment


          • #6
            Die Information hab ich von einem Mitarbeiter. Vielleicht stimmt es ja auch nicht, schon möglich!

            Das ; am Ende hab ich.

            Wenn ich denn View ohne Order erstelle legt er ihn ordnungsgemäß an.

            Die select Anweisung mit order by .... funktioniert auch!!

            ???

            Comment


            • #7
              CREATE OR REPLACE VIEW LISTE__V AS SELECT
              a.*, b.auswahlmenge,b.st_fertart, b.ap_fertart, b.auftr_z_index, b.pos_x,
              b.pos_y, b.pos_z, b.indizierung, b.show_index, b.filter_id FROM TEILE a, LISTE b WHERE
              a.teilenummer = b.teilenummer AND a.t_index = b.t_index ORDER BY b.indizierung;

              Hilft das weiter?

              Folgendes (siehe unten) hat nichts gebracht! Erneut die gleiche Fehlermeldung! * unter ORDER BY
              ORA-00933: SQL command not properly ended

              CREATE OR REPLACE VIEW LISTE__V AS SELECT
              b.indizierung, a.*, b.auswahlmenge,b.st_fertart, b.ap_fertart, b.auftr_z_index, b.pos_x,
              b.pos_y, b.pos_z, b.show_index, b.filter_id FROM TEILE a, LISTE b WHERE
              a.teilenummer = b.teilenummer AND a.t_index = b.t_index ORDER BY 1

              Comment


              • #8
                Hallo,

                gib doch bitte mal das Statement an, sonst ist das hier nur grosses Raetselraten. Laut meinem Syntaxdiagramm geht das mit ORDER BY.

                WErden im SELECT Aggregat-Funktionen verwendet? Hast du das mit der Reihenfolge mal ausprobiert? Hast du das mit dem ALIAS mal ausprobiert??
                Steht da ein DISTINCT in der SELECT Liste? Wird das Attribut ueberhaupt in der SELECT-Liste aufgefuehrt?? Hat das Feld irgendeinen exotischen Datentyp (LOB z.B.)?

                MfG

                Stefa

                Comment


                • #9
                  Hallo,

                  dein Mitarbeiter scheint auf dem neuesten Stand zu sein. Habe gerade folgendes im GOOGLE gefunden:

                  "in 7.3.4 you were able to do the following query:
                  CREATE TABLE ORDERED_DEPT AS SELECT * FROM SCOTT.DEPT ORDER BY DEPTNO;

                  But in Oracle 8.0.x, you get an ora-933 error -- this is an UNSUPPORTED FEATURE IN ORACLE 8
                  This is Bug 617289. The code has been removed from oracle8. The ORDER By clause cannot appear in subqueries within other statements.
                  However, this was corrected and IS supported and IS documented feature in Oracle 8.1.5 and above.

                  Oracle has a document on this:
                  Note:1069515.6
                  Subject: ORA-00933: TRYING TO CREATE TABLE AS SELECT WITH ORDER BY

                  So -- you can do it in Oracle version 7.3.x, and you can do this in oracle 8.1.5 and higher
                  you just cannot do it in oracle 8.0.x
                  (i tested this and confirmed this -- oracle 7.3.4, oracle 8.1.6, and oracle 8.0.5)

                  "

                  tja, dann wird das wohl nix in der DB-Version.

                  Sorry for you.

                  Stefa

                  Comment


                  • #10
                    exotischer Datentyp -> nein.
                    b.indizierung ist varchar2 (30)

                    attribut ist in der select liste aufgeführt.
                    siehe oben, habe jetzt das vollständige Statement eingestellt.

                    hab das mit der reihenfolge ausprobiert, funktioniert bisher trotzdem nicht

                    kein DISTINCT in der select anweisung.

                    Was sind Aggregat-Funktionen?

                    Gruß
                    Tobia

                    Comment


                    • #11
                      OK. Danke trotzdem.

                      Gruß
                      Tobia

                      Comment

                      Working...
                      X