Re: Tricky INSERT

2003-08-14 Thread Brent Baisley
You can't insert select into a table you select from. So yes, you would need to create a temp table first and them insert select from that. On Tuesday, August 12, 2003, at 07:30 PM, Fraser Hanson wrote: I have table A with column id, and table B with columns id and content. I am trying to build

Re: Tricky INSERT

2003-08-14 Thread Nils Valentin
Hi Fraser, I a sorry I dont understand what you want to do. Could you show how you want it to be and the queries which you used so far ? Best regards Nils Valentin Tokyo/Japan 2003 8 13 08:30Fraser Hanson : I have table A with column id, and table B with columns id and content. I am

Tricky INSERT

2003-08-14 Thread Fraser Hanson
I have table A with column id, and table B with columns id and content. I am trying to build a query that inserts all ids from table A into table B, and also sets the value field for all these new entries to a given value. For example: #Before the query, the tables are like this: mysql select *

Re: Tricky INSERT

2003-08-14 Thread Fraser Hanson
On Wed, Aug 13, 2003 at 08:24:48AM -0400, Brent Baisley wrote: You can't insert select into a table you select from. So yes, you would need to create a temp table first and them insert select from that. Actually, according to a recent user comment in the mysql documentation for INSERT ...

Re: Tricky INSERT

2003-08-14 Thread Fraser Hanson
On Wed, Aug 13, 2003 at 01:35:39PM +0900, Nils Valentin wrote: Hi Fraser, I a sorry I dont understand what you want to do. Could you show how you want it to be and the queries which you used so far ? Sure, thanks for the reply and I'll try to be more clear. As in my previous post, suppose