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.

Anweisung in MS SQL-Server verwenden

Empfohlene Antworten

Hallo Zusammen,

ich habe folgendes Problem. Ich habe versucht diese Anweisung auf MS SQL-Server auszuführen. Leider funktioniert das nicht. Kann mir jemand einen Tipp geben was ich daran ändern muss?

drop type US_NotenObjTyp;

drop type D_NotenObjTyp;

drop type NotenObjTyp;

drop function USnachD_SQL;

drop type D_NotenTyp;

drop type US_NotenTyp;


create distinct type D_NotenTyp

  as decimal(3,2)

  with comparisons;


create distinct type US_NotenTyp

  as decimal(3,2)

  with comparisons;


create function USnachD_SQL(us US_NotenTyp) returns D_NotenTyp

  return( case when decimal(us) < 1.0 then D_NotenTyp(5.0)

               when decimal(us) < 1.5 then D_NotenTyp(4.0)

               when decimal(us) < 2.5 then D_NotenTyp(3.0)

               when decimal(us) < 3.5 then D_NotenTyp(2.0)

               else D_NotenTyp(1.0) end);


create type NotenObjTyp as (

  Land varchar(20),

  StringWert varchar(20))  

  not final

  not instantiable

  mode DB2SQL

    method getnote ()

    returns float

    language SQL

    deterministic

    reads sql data

    no external action;


create type US_NotenObjTyp under NotenObjTyp as(

  NumWert US_NotenTyp,

  WithHonors char(1) )

  instantiable

  mode DB2SQL

    overriding method getnote() returns float;    


create type D_NotenObjTyp under NotenObjTyp as(

  NumWert D_NotenTyp,

  Lateinisch varchar(15) )

  instantiable

  mode DB2SQL

    overriding method getnote() returns float;   


create method getnote() for US_NotenObjTyp

  RETURN  float(decimal(USnachD_SQL(self..NumWert)));


create method getnote() for D_NotenObjTyp

  RETURN  float(decimal(self..NumWert));

So langsam sollte man es doch begriffen haben:

Welche Fehlermeldung gibt er aus?

Hast du den Code genau ueberprueft?

Was soll der Code machen?

Hast du den Code Schritt fuer Schritt ausgefuehrt um die Fehlerquelle einzuschraenken?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.