Hi, you're right it should work and it does. I discovered that the error was in another place, namely in my main xml file. I had a file called welcome.xml which pointed to a file called def.xml. In def xml. was the code for opening the connection and running the query (part of which I attached in the last mail). In welcome.xml it was included as: ----------------------------------------- ... <!DOCTYPE document [ ... <!ENTITY definitions SYSTEM "def.xml"> ]> ... <def_data> &definitions; </def_data> ... ----------------------------------------- I discovered after a while that the changes made in def.xml was not updated. Welcome.xml was still using the earlier version of the document. I find this most peculiar and unlogic, but can find no other explanation. I took away the pointers and included the code directly in welcome.xml and now it works perfectly. My problem now is that welcome.xml becomes very long. I run several queries and had much better control over my code when I could separate it into different files. Does anybody know any way to fix the problem with welcome.xml not seeing the changes to def.xml and the other files? Thanks again, /Anne Marie -----Original Message----- From: JEULIN Olivier [mailto:[EMAIL PROTECTED]] Sent: 8. august 2001 11:49 To: '[EMAIL PROTECTED]' Subject: RE: ESQLl where condition It should work. The only problem I can think of, is that something goes wrong when the java class is generated. So take a look at it (in your 'repository' directory) and search for the string "select deviceID, description from terminal" to see if it's correct or not (truncated for exemple). ######### original message ######### I'm trying to run a query and it will not work properly. in mysql I have two tables and I run the following query: mysql> select deviceID, description from terminal, deviceType where deviceType.deviceType = terminal.deviceType; +----------+-------------+ | deviceID | description | +----------+-------------+ | 57685251 | PSTN | | 57685251 | PSTN | | 22671300 | ISDN | | 90098999 | GSM | | 95755499 | GSM | +----------+-------------+ 5 rows in set (0.00 sec) When I try to run it on a xsp page (see code at the bottom of the page) I get the following result: Device ID Description 90098999 PSTN 95755499 PSTN 57685251 PSTN 22671300 PSTN 57685251 PSTN 90098999 ISDN 95755499 ISDN 57685251 ISDN 22671300 ISDN 57685251 ISDN 90098999 GSM 95755499 GSM 57685251 GSM 22671300 GSM 57685251 GSM As far as I can see the where condition is not working when I run it in the xsp page (as you can see below this is the result when the query is run without the condition). mysql> select deviceID, description from terminal, deviceType; +----------+-------------+ | deviceID | description | +----------+-------------+ | 90098999 | PSTN | | 95755499 | PSTN | | 57685251 | PSTN | | 22671300 | PSTN | | 57685251 | PSTN | | 90098999 | ISDN | | 95755499 | ISDN | | 57685251 | ISDN | | 22671300 | ISDN | | 57685251 | ISDN | | 90098999 | GSM | | 95755499 | GSM | | 57685251 | GSM | | 22671300 | GSM | | 57685251 | GSM | +----------+-------------+ 15 rows in set (0.00 sec) What's the problem? Is there something special about the esql syntax? Or is it something else? Anybody who can figure it out? /Anne Marie <esql:execute-query> <esql:query> select deviceID, description from terminal, deviceType where deviceType.deviceType = terminal.deviceType; </esql:query> (snip) --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>