> Im having a problem with MySQL in that I cannot get this syntax to
> execute (when populating the entities):
> INSERT INTO TABLE (ID, SOME_FK, DESCRIPTION) VALUES (1, SELECT ID FROM
> OTHERTABLE WHERE NAME = 'SOMETHING'), 'test');
Does this work out for you?...
INSERT INTO TABLE (ID, SOME_FK, DESCRIPTION)
SELECT 1, OTHERTABLE.ID, 'test' FROM OTHERTABLE WHERE NAME = 'SOMETHING';
I see insert...select is supported
http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html
MySQL 4.1 has added subquery/subselect support,
is that the version its not working on?
-TR
> -----Original Message-----
> From: David Sean Taylor [mailto:david@bluesunrise.com]
> Sent: Wednesday, May 05, 2004 5:08 PM
> To: Jetspeed Developers List
> Subject: [j2] database platform support
>
>
> I have now built, tested, deployed and run J2 with the following
> database platforms:
>
> Hypersonic SQL
> Oracle 8.1.6
> Oracle 9.2.0.1 (Ate)
> MySQL 3.0.8 driver, MySQL 4.0.18
>
> The documentation for switching and configuring databases is here:
>
> http://portals.apache.org/jetspeed-2/database.html
>
> Im having a problem with MySQL in that I cannot get this syntax to
> execute (when populating the entities):
>
> INSERT INTO TABLE (ID, SOME_FK, DESCRIPTION) VALUES (1, SELECT ID FROM
> OTHERTABLE WHERE NAME = 'SOMETHING'), 'test');
>
> But MySQL doesn't support a SELECT in the VALUES
> Any MySQL experts know how to do this in a script?
> (Its fully supported by Oracle and Hypersonic)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
|