14 messages in org.openoffice.fr.progRe: [prog] syntaxe SQL et *
FromSent OnAttachments
nicolasAug 24, 2006 3:53 am 
Manuel NAUDINAug 24, 2006 4:13 am 
nicolasAug 24, 2006 4:40 am 
nicolasAug 24, 2006 5:19 am 
Manuel NAUDINAug 24, 2006 5:25 am 
Manuel NAUDINAug 24, 2006 5:30 am 
NicolasAug 26, 2006 3:13 pm 
Alex ThurgoodAug 27, 2006 1:57 am 
Manuel NAUDINAug 27, 2006 5:41 am 
NicolasAug 27, 2006 8:29 am 
Manuel NAUDINAug 27, 2006 8:44 am 
NicolasAug 27, 2006 8:57 am 
Manuel NAUDINAug 27, 2006 9:20 am 
NicolasAug 28, 2006 1:43 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] syntaxe SQL et *Actions...
From:nicolas (itki@wanadoo.fr)
Date:Aug 24, 2006 4:40:27 am
List:org.openoffice.fr.prog

Bonjour, merci manuel pour ta réponse, j'ai essayé dans OOo Basic de définir ma variable SQL comme suit : SQL="SELECT * from ""Table"" where (LOCATE('chantal',""Table"".""Nom"",1)>0 )" Le code est accepté mais ne renvoie rien, or il y a une chantal quelquechose
dans ma base... je ne comprends pas . Une base intégrée OOo est elle de type
HSQL ??

Message du 24/08/06 13:13 De : "Manuel NAUDIN" A : pr@fr.openoffice.org Copie à : Objet : Re: [prog] syntaxe SQL et *

bonjour, dans une base intégrée hsqldb, :

LOCATE(search,s,[start]) returns the first index (1=left, 0=not found) where search is found in s, starting at start

ressemble à ce que tu cherches, avec quelques différences néanmoins.

il y a aussi :

The LIKE keyword uses '%' to match any (including 0) number of characters, and '_' to match exactly one character. To search for '%' or '_' itself an escape character must also be specified using the ESCAPE clause. For example, if the backslash is the escaping character, '\%' and '\_' can be used to find the '%' and '_' characters themselves. For example, SELECT .... LIKE '\_%' ESCAPE '\' will find the strings beginning with an underscore.

qui n'est pas une fonction mais une clause dans le WHERE.

http://hsqldb.org/web/hsqlDocsFrame.html

Bone journée