Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Oracle XE:Order by Variable?

Empfohlene Antworten

Veröffentlicht

Hallo zusammen,

ich habe trotz intensiver Suche (noch) keine Lösung für folgendes Problem gefunden:

Ich habe eine Abfrage über x Tabellen. Ich willl mir mehrere Attribute anzeigen lassen.

Das Ergebnis soll sortiert werden nach Benutzerwunsch, also nach einer zu füllenden Variable.


Select

t1.A

,t2.B

,t3.C

from 

Tabelle1 t1

,Tabelle2 t2

,Tabelle3 t3

where

t1.A = t2.A

and

t1.B = t3.C

order by

:vSortierung

Geht so nicht.

Ich meine, es kommt keine Fehlermeldung, die Sortierung passt aber auch nicht, egal, was ich eingebe.

Ist mein Problem so überhaupt zu lösen??

Danke im Voraus.

Gruß

Flons

:vSortierung kann die spalte numerisch angeben. d.h. wenn du nach deiner ersten ergebnisspalte sortieren möchtest, löst den SQL nach "ORDER BY 1", wenn du nach der zweiten spalte sortieren möchtest, nach "ORDER BY 2" auf.

s'Amstel

Hallo Amstelchen,

danke für Deine Antwort. Aber das geht nicht! ;-)

Ich benutze für die Statement- Erstellung Hora 7.3.0.9

Die Sortierung funzt nur, wenn ich das Order by fest eingebe,

z.B.

order by 1

So geht es nicht:

order by :vSortierung

So auch nicht:

order by to_number(:vSortierung)

Die Sortierung scheint dann ignoriert zu werden, bzw. es ist keine Sortierung zu erkennen.

Gruß

Flons

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.