Domino via ODBC - Uppercase/Ucase

Forum destiné aux questions sur le développement : Formules, LotusScript, Java ...

Domino via ODBC - Uppercase/Ucase

Messagepar nicorio » 20 Avr 2010 à 10:10

Bonjour,

Je suis en train de programmer une application Delphi qui doit récupérer certaines données dans une base Lotus. J'ai installé les drivers ODBC Notes SQL et cela fonctionne bien globalement.

Je me heurte cependant aujourd'hui au problème suivant : ma requête est du type SELECT UCASE(monChamp) FROM maTable, et j'obtiens l'erreur suivante :
"[Lotus][ODBC Lotus Notes]Name, constant, or expression expected."

La requête fonctionne lorsque j'enlève la fonction UCASE. J'ai cherché dans la doc livrée avec Notes SQL et ils ne parlent que des fonctions AVG, COUNT, MAX, MIN et SUM. Cela signifie-t-il qu'aucune autre fonction n'existe ?
nicorio
 

Messagepar stloje » 20 Avr 2010 à 11:55

Il ne faut pas oublier que Lotus n'est pas à l'origine un SGBD et n'est pas tenue de suivre le standard SQL-89 ou SQL-92.

Lotus Notes a fourni un outil qui permet de requêter les bases Notes en format SQL. Ces dernières étant des bases hiérarchiques (parent-enfant), il n'y a donc pas de fonctions de bases Notes pour faire du SQL.


Voici ce qu'il y a comme info sur le site d'IBM

[urlhttp://www.ibm.com/developerworks/lotus/documentation/notessql/index.html[/url]

Summary of supported ODBC SQL grammar


The following ODBC SQL grammar is supported:
Supported statements


ALTER TABLE
CREATE INDEX

CREATE TABLE

CREATE VIEW

DELETE positioned

DELETE searched

DROP INDEX

DROP TABLE

DROP VIEW

INSERT

SELECT

FOR UPDATE
FROM

GROUP BY

HAVING

ORDER BY

UNION

UPDATE searched
UPDATE positioned

WHERE



Numeric operators


NotesSQL supports the following numeric operators in expressions: Operator Meaning
+ Addition
- Subtraction
* Multiplication
/ Division



Predicate operators


NotesSQL supports the following predicate operators: Operator Meaning
<Less> Greater Than
<Less>= Greater Than or Equal To
= Equal To
<> Not Equal To
BETWEEN Specifies a range of values between a lower and upper boundary.
IN Specifies a member of a set of specified values or a member of a subquery.
LIKE Use for matching a pattern. Wildcard characters in LIKE predicate:
Use an underscore ( _ ) to represent a single character.

Use a percent symbol ( % ) to represent any number of characters.

Use a backslash ( \ ) as the escape character.

NOT Use the NOT operator with another operator to specify a search condition that is false. For example: NOT IN, NOT LIKE, or NOT BETWEEN.
ANY Use to compare a value to each value returned by a subquery. Can be prefaced by =, <>, >, >=, <, <=, or =.
=ANY is equivalent to IN.

<>ANY is equivalent to NOT IN.

SOME SOME is an alternate keyword for ANY.
ALL Use to compare a value to each value returned by a subquery. Can be prefaced by =, <>, >, >=, <, or <=.
EXISTS "True" if a subquery returned at least one record.



Column functions


Column functions can be part of a SELECT clause. A column function takes an entire column of data as its argument and produces a single data item that summarizes the column. For example, the AVG column function takes a column of data and computes its average.
The argument to a column function can be a field name or an expression. NotesSQL supports the following Column functions: Function Description
AVG Returns the average of the values in a numeric field or expression. For example, AVG(SALES) returns the average of all values in the "SALES" column.
COUNT Returns the number of values in any field expression.
MAX Returns the highest value in any field expression. For example, MAX(SALES) returns the highest SALES field value.
MIN Returns the lowest value in any field expression. For example, MIN(SALES) returns the lowest SALES field value.
SUM Returns the total of all values in a numeric field expression. For example, SUM(SALES) returns the sum of all SALES field values.
Et vive le cambouis! Si t'en as jusque sous les bras, c'est parce que tu as cherché longuement la solution ou tout simplement parce que tu t'es vautré!
Avatar de l’utilisateur
stloje
Posteur expérimenté
Posteur expérimenté
 
Message(s) : 335
Inscrit(e) le : 09 Sep 2008 à 13:18
Localisation : Orléans


Retour vers Développement

cron