This query uses a "subselect" that is not currently supported
by MySQL.
Check the manual for details:
http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html

Regards,
Joseph Bueno

jorge machado wrote:

> #Hello
> #I'm using hibernate a O/R model from sourceforge and it makes the #bridge
> #between sql and a query languange from hibernate.
> #Why this query dont work
> #at mysql. this query is generated by hibernate but
> #it works in all databases I know:
>
> #You just need to run this in the command
> #prompt of mysql.exe
> #the tables
>
> CREATE TABLE mae(
>  ID int(11) NOT NULL AUTO_INCREMENT,
>  STRINGSET varchar(32) NOT NULL default '',
>  PRIMARY KEY (ID)
> ) TYPE=InnoDB;
>
> CREATE TABLE stringset(
>  ID varchar(32) NOT NULL ,
>  ELEMENT varchar(100) NOT NULL default '',
>  PRIMARY KEY (ID)
> ) TYPE=InnoDB;
>
>
> insert into mae values(1,'key');
> insert into stringset values('key','the string for search');
>
> #the query:
>
> SELECT m.ID AS x0_0_
> FROM mae AS m
> WHERE ('the string for search' in
> (SELECT str0_.ELEMENT
>  FROM stringset str0_
>  WHERE m.STRINGSET=str0_.ID));
>
>
> #it gives an error in the:
> #(SELECT str0_.ELEMENT FROM stringset str0_ WHERE #m.STRINGSET=str0_.ID));
> #I have done this in all versions of mysql and didn't work
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to