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.

Leeres Feld auffüllen

Empfohlene Antworten

Veröffentlicht

Ich hab ne spalte wo bei manchen datensätzen diese spalte leer ist, also wo manche einträge leer sind, diese möchte ich auffüllen, jetzt hab ich mir des so gedacht:

UPDATE

tabelle

SET

spalte = 'blubb'

WHERE

spalte = ' ';

des geht aber net, was muss ich anders machen?

Probier's mal mit

WHERE spalte IS NULL;

des geht aber net

:rolleyes:

wenn "des geht net" heisst: fehlermeldung - dann ist deine spalte nicht alphanumerisch.

wenn "des geht net" heisst: keine ergebnisse - dann ist wie der vorposter schon angab, NULL abzufragen.

s'Amstel

  • Autor

Also das funktioniert so nicht, ich hab das folgende Statement bei 2 Spalte ausprobiert wo es leere Felder gibt, die eine Spalte ist Number, die andere varchar2

SELECT

count(spalte)

FROM

tabelle

WHERE

spalte IS NULL

Immer kommt als Ergebnis 0 raus, des kann aber net sein, da es ja defacto leere felder gibt.

Was bedeutet denn leere felder für dich? NULL ist ein leeres feld im Sinne der datenbank. Der Inahlt ist undefiniert (daher auch der Operator IS NULL und nicht = NULL)

Wenn Du aber jetzt einfach Strings mit lauter Blanks drinnen stehen hast, dann ist das Feld nicht leer.

Dim


SELECT

 count(spalte)

FROM

 tabelle 

WHERE

 spalte IS NULL

Immer kommt als Ergebnis 0 raus, des kann aber net sein, da es ja defacto leere felder gibt.
IMHO muss das so heißen:

SELECT

 count(*)

FROM

 tabelle 

WHERE

 spalte IS NULL

count(*) zählt alle Zeilen, count(spalte) die Zeilen, in denen spalte not null ist.

hth

Reinhold

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.