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

Hallo, kann mir jemand ein SQL statement geben, in welchen

einer Variable. das Datum der letzen woche (Montag) und (Freitag in eine zweite)automatisch zugewiesen wird.

D.h. jedem Montag früh mir das Datum vom Montag davor gibt.

D.h. Jeden Montag wird das script ausgeführt und liefert:

z.B. @date1 = (Montag vor einer woche)

@date2= (Freitag letze woche)

Vielen Dank für die Hilfe

DECLARE @tag datetime

SET @tag = DATEADD(d, -7, getdate())

WHILE (DATENAME(dw, @tag) <> 'Montag')

SET @tag = DATEADD(d, -1, @tag)

[color=green]-- [i]Die beiden folgenden Zeilen geben die berechneten Werte aus.[/i]

-- [i]Es ist genauso möglich, diese Daten anderen Variablen zuzuweisen, [/i]

-- [i]oder sie in einer Tabelle zur weiteren Verwertung auszugeben.[/i]

-- [i]Den Part überlasse ich aber dir, da du keine Spezifikationen angegeben hast.[/i][/color]

PRINT DATENAME(dw, @tag) + ', ' + CONVERT(varchar(12), @tag, 106)

PRINT DATENAME(dw, DATEADD(d, 4, @tag)) + ', ' + CONVERT(varchar(12), DATEADD(d, 4, @tag), 106)

[b]Ausgabe: (gültig für diese Woche)[/b]

Montag, 16 Feb 2004

Freitag, 20 Feb 2004

Hi, Danke!

Habe es eben ausprobiert, nur ist es irgendwie nicht kompatibel zu Sybase, komisch..

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.