Einzelnen Beitrag anzeigen

Benutzerbild von Union
Union

Registriert seit: 18. Mär 2004
Ort: Luxembourg
3.487 Beiträge
 
Delphi 7 Enterprise
 
#10

Re: Problem: Oracle+Delphi und Währungs- und Datumsfelder

  Alt 6. Aug 2004, 21:03
Zitat von Robert_G:
Ausserdem würde ich gerne wissen warum "meine" Query den Fehler produziert sobald das Datum ins Spiel kommt (hab ich oben gepostet).
1. "DATE" hat als DatenType Vorrang vor Variablen-/Spalten-/Tabellennamen -> boom.
Du solltest also deine Spalten Date & User sofort umbenennen!
Das sind reservierte Keywords, die dir anscheinend durch einen Bug in Ora7 nicht sofort um die Ohren gehauen wurden. (Darauf hatte ich vorhwer nicht geachtet.
Er hat bei USER recht:
Code:
USER returns the name of the session user (the user who logged on) with the datatype VARCHAR2. Oracle compares values of this function with blank-padded comparison semantics.

In a distributed SQL statement, the UID and USER functions identify the user on your local database. You cannot use these functions in the condition of a CHECK constraint.

Example
The following example returns the current user and the user's UID:

SELECT USER, UID FROM DUAL;
 
USER                                 UID
------------------------------ ----------
OE                                    33
aber Date kannst Du als Feldnamen verwenden. Solltest Du aber trotzdem nicht . Auszug aus den Oracle Beispielen:
Code:
For example, you can define a relational table to keep track of your contacts:

CREATE TABLE contacts (
  contact    external_person
  date       DATE );
  Mit Zitat antworten Zitat