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.

Transact SQL

Empfohlene Antworten

Veröffentlicht

Hi,

vielleicht kann mir von euch jemand den passenden Denkanstoss geben :)

Mein Problem ist folgendes:

IF(SELECT COUNT(*) FROM TABLE1) = 0

.

.

.

So nun hab ich aber TABLE 1 bis n und will von daher ne Schleife einbauen.

Da muss ich dann natuerlich mein SELECT als String zusammenbauen.

SET @CMD = 'SELECT COUNT(*) FROM TABLE' + CAST(@zaehl AS CHAR(1)) --@zaehl ist die Zaehlvariable der Schleife.

Das Problem was ich nun habe ist, dass es mit einem EXEC(@CMD) direkt nach dem IF nicht hinhaut. Ich hab keine Ahnung, wieso ich das nicht machen daff, aber vielleicht hat ja jemand ne gute Idee.

Im Prinzip sollte das dann so aehnlich aussehen:

(zumindest dacht ich mir sowas in der Art, aber scheinbar gibt halt die Ausfuehrung von @CMD schon nichts zurueck und inst deshalb da nicht angebracht. Mir viel aber bisher nix besseres ein)

IF EXEC(@CMD) = 0

.

.

.

vielen Dank schonmal fuer jede Hilfe :)

Goos

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.