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.

Wenn-Befehl in SQL

Empfohlene Antworten

Veröffentlicht

Hallo,

gibt es in SQL einen Wenn-Befehl?

:confused: Wie z.b.

Select Kunde, Wenn(Ort = Köln; Koeln; Ort) As OrtNeu

From Adressen

oder so ähnlich???

meinst du so etwas??


select Kunde, Ort
from Adressen
where Ort = Köln or Ort = Koeln
[/PHP]

Nein,

etwa so:

Wenn(Bedingung;Dann schreibe A in Feld; Sonst B in Feld)

Ist mir nicht bekannt. Geht meines wissens nur in verbindung mit einer anderen Progsprage etwa php

if $sqlbefehl = (....) then

......

else

......

:D Ja!!

Danke

sry, aber was ist das fuer eine DB???

SQL ist das jedenfalls nicht mehr

@Containy

Den Befehl den ich Brauchte war so ähnlich und zwar

z.B. so

SELECT Anrede,

Anredeneu = CASE WHEN Anrede = 'Frau' THEN 'Frau' ELSE 'Keine Frau'

END

FROM Adressen

GROUP BY Anrede

:D

@-silencer-

Die Datenbank ist auf einem MS SQL Server 7.0

Hallo T-B,

der DECODE() Befehl müßte eigentlich das sein was du suchst.

Ich weiß aber nicht, ob es ihn beim MS SQL Server gibt.

Avidus

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.