portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject Re: [j2] database platform support
Date Thu, 06 May 2004 17:16:00 GMT

On May 5, 2004, at 2:43 PM, Tim Reilly wrote:

>> 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';
>
Hey Tim,

I thought my statement was working, but it wasn't.
My statement was inserting zeros into the FK.
I retried your statement above and that did the trick.

Thanks!

David


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message