cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabrice.Go...@inexware.fr
Subject Re: Problems with SQL 'LIKE' on Cocoon/Access
Date Wed, 03 Jan 2001 15:56:20 GMT
<P>Hi,</P><P>I think that correct SQL pattern is not * but %. So you should
use this query :</P><P><FONT FACE="Courier">SELECT ... FROM ... WHERE ...
LIKE 'C%'</FONT>;<BR><BR>___<BR><BR>Fabrice Gouin<BR>Inexware<BR><A
HREF=http://www.inexware.fr>http://www.inexware.fr</A></P><P>&nbsp;<BR><FONT
SIZE=2><B>&quot;yann petit&quot; &lt;ypetit@capgemini.fr&gt;</B></FONT><BR><FONT
SIZE=2>01/03/2001 03:46 PM</FONT><BR><FONT SIZE=2>Please respond to cocoon-users</FONT><BR><BR>
<FONT SIZE=2>To:</FONT> <FONT SIZE=2>&lt;cocoon-users@xml.apache.org&gt;</FONT><BR>
<FONT SIZE=2>cc:</FONT> <BR> <FONT SIZE=2>bcc:</FONT> <BR>
<FONT SIZE=2>Subject:</FONT> <FONT SIZE=2>Problems with SQL 'LIKE' on Cocoon/Access</FONT><BR>
<BR><BR></P><P><FONT FACE="Monospace,Courier">Hi,<BR></FONT><BR><FONT
FACE="Monospace,Courier">I try to make a SQL request containig a 'LIKE' but it doesn't
work ( i tried<BR>under Access and it worked fine)<BR>I want to retrieve all the
fields from my table which value starts with the<BR>letter C<BR>So I do a SELECT
... FROM ... WHERE ... LIKE 'C*' ORDER BY ... ;<BR>But I only get the field containig
the value C* and not all the fields<BR>stating with C<BR>So how can I use the
* to match 'everything' ...<BR></FONT><BR><FONT FACE="Monospace,Courier">Perhaps
I've made a mistake... If someone has an idea ....<BR></FONT><BR><FONT
FACE="Monospace,Courier">Here is the request :<BR></FONT><BR><FONT
FACE="Monospace,Courier">&lt;query&gt;<BR> &nbsp; &nbsp;&lt;esql:execute-query&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;esql:driver&gt;sun.jdbc.odbc.JdbcOdbcDriver&lt;/esql:driver&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;esql:dburl&gt;jdbc:odbc:tsd&lt;/esql:dburl&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;esql:query&gt;<BR>SELECT LIB,
ID<BR>FROM DELIVERABLES<BR>WHERE LIB LIKE 'C*'<BR>ORDER BY LIB;<BR>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;/esql:query&gt;<BR> &nbsp;
&nbsp; &nbsp; &nbsp;&lt;esql:results&gt;<BR> &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;&lt;result&gt;<BR> &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;LIB&gt;&lt;esql:get-string
column=&quot;LIB&quot;/&gt;&lt;/LIB&gt;<BR> &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;ID&gt;&lt;esql:get-string
column=&quot;ID&quot;/&gt;&lt;/ID&gt;<BR> &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;&lt;/result&gt;<BR> &nbsp; &nbsp;
&nbsp; &nbsp;&lt;/esql:results&gt;<BR> &nbsp; &nbsp;&lt;/esql:execute-query&gt;<BR>&lt;/query&gt;<BR></FONT><BR><FONT
FACE="Monospace,Courier">When I tried with : &nbsp; &nbsp;... LIKE C* ...<BR>It
produced an error because Access needs the quotes to process the request.<BR></FONT><BR><FONT
FACE="Monospace,Courier">When I tried with : &nbsp; &nbsp;... LIKE &quot;C*&quot;
...<BR>It produced an error because there's already some &quot;&quot; in the
java method used<BR>to process the request.<BR></FONT><BR><FONT
FACE="Monospace,Courier">When I tried with : &nbsp; &nbsp;... LIKE 'C*' ...<BR>I
only get the field LIB containing the value C*, or I want all the fields<BR>LIB which
value starts with the letter C !<BR></FONT><BR><BR><FONT FACE="Monospace,Courier">Thanks<BR></FONT><BR><BR><FONT
FACE="Monospace,Courier">Yann<BR></FONT><BR><BR><FONT FACE="Monospace,Courier">---------------------------------------------------------------------<BR>To
unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org<BR>For additional commands,
e-mail: cocoon-users-help@xml.apache.org</FONT></P>
Mime
View raw message