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.

Empfohlene Antworten

Veröffentlicht

Hi,

ich habe eine Tabelle mit folgenden Spalten:

Ausgaben/Ausgabenlimit/Differenz

Ich möchte nun die Ausgaben in 3 Kategorien einteilen (A,B,C).

Dafür habe ich der Tabelle eine neue Spalte hinzugefügt die ich Category genannt habe.

Sollten die Ausgaben Größer oder gleich dem Ausgabenlimit sein fällt dies in Kategorie A

Sollten die Ausgaben 95-99% des Ausgabenlimit sein fällt dies in Kategorie B

Sollten die Ausgaben 90-95% des Ausgabenlimit sein fällt dies in Kategorie C

Kategorie A ist ja ganz einfach:

update Tabelle t set Category = case when ausgaben >= ausgabenlimit then 'A'

Wie setze ich dies nun mit den Prozentwerten um?

Viele Grüße

Ich würde es in der Art machen:

update Tabelle t set Category = case when (ausgaben > ausgabenlimit*0,95 and ausgaben <= ausgabenlimit*0,99) then 'B'

update Tabelle t set Category = case when (ausgaben > ausgabenlimit*0,90 and ausgaben <= ausgabenlimit*0,95) then 'C'

Wobei 95-99% wahrscheinlich heißen soll, dass es von 95% des Limits bis 1 Cent unter dem Limit gehen soll, oder? Dann natürlich einfach "and ausgaben < ausgabenlimit". Ansonsten hast du zwischen 99 und 100% eine Lücke.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.