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.

kniffliges SQL

Empfohlene Antworten

hallo,

in einer tabelle tab_inst stehen folgende einträge (hab das jetzt schonmal nach user und datum gruppiert)


[b]

USER     PROCESS     DAT

[/b]

usr1     start       27-02-03

usr1     setup       01-03-03

usr1     setup       02-03-03

usr1     delete      02-03-03

usr1     end         03-03-03

usr7     end         08-03-03

usr7     setup       10-03-04

usr7     start         03-03-04

ich möchte jetzt diejenigen einträge selektieren, für die - fälschlicherweise - der process "end" vor dem process "start" steht (hier wäre dies der user usr7).

wie kann ich das machen?!

grüße,

technician

welches dbms??

select a.user, a.dat as start_date, b.dat as end_date from tab_inst a, tab_inst b

where a.user = b.user

and a.process = 'start'

and b.process = 'end'

and a.dat > b.dat

sollte funtionieren, wenn nicht zu einem user mehrere start- bzw end-einträge vorhanden sind... => was ist denn der primärschlüssel bei der tabelle??

hth...

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.