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 habe folgendes sql-statement:


Select @num2 = sum(netto),@num14 = sum(netto) 

from sysadm.stat0 AS S 

where so0_nrid = @so0_nrid and jahr = year(getdate())-1 and template is null

and (periode >=1 and periode <= max(periode))

das mit der periode haut so nicht hin folgende fehlermeldung:
Meldung 147, Ebene 15, Status 1, Zeile 1

An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference.

bitte um hilfe!

gruß alex

wollte max(periode) vom aktuellen jahr:


Select sum(netto),sum(netto) 

from sysadm.stat0 AS S 

where so0_nrid = 20292180697446 and jahr = year(getdate())-1 and template is null

and (periode >=1 and periode <= (select max(periode) from sysadm.stat0 where jahr = year(getdate())))

so funktionierts.

gruß alex

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.