Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi Firebird Feld automatisch berechnen (https://www.delphipraxis.net/180361-firebird-feld-automatisch-berechnen.html)

I can me not out 14. Mai 2014 17:40

Datenbank: Firebird • Version: 2.5 • Zugriff über: Delphi

Firebird Feld automatisch berechnen
 
Hallo

Ich bin neu hier. Ich bedanke mich gleich für die vielen interessanten Themen, die mir schon viele Male weitergeholfen haben.

Nun habe ich ein Problem:

Ich will mit Firebird eine neue Tabelle erstellen mit einem Feld Geburtsdatum. In einem weiteren Feld möchte ich, dass danach automatisch das Geburtsjahr angezeigt wird. Ich habe mit computed by und extract year from Geburtsdatum versucht, aber es funktioniert nicht. Kann mir da jemand helfen?

Geburtsdatum date ,

GebJahr computed by extract(year from Geburtsdatum),

Vielen Dank im Voraus
I can me not out

tsteinmaurer 14. Mai 2014 17:54

AW: Firebird Feld automatisch berechnen
 
Eine Fehlermeldung wäre hilfreich ...

I can me not out 14. Mai 2014 18:01

AW: Firebird Feld automatisch berechnen
 
Danke für die schnelle Antwort.
Ich habe das Problem selber gelöst. Es war vermutlich ein Klammerfehler.

So funktioniert es:

Gebdatum date,
Jahr integer computed by (extract(year from Gebdatum))

mfG

I can me not out

mkinzler 14. Mai 2014 20:07

AW: Firebird Feld automatisch berechnen
 
Es fehlte auf jedenfall der Typ des Feldes


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:46 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz