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