OT: copy record in mysql

2003-12-08 Thread Ryan Mitchell
Hello

I google'd this but couldn¹t get an answer.

I have a table with lots of columns of different types. I need to copy a row
to a new row... How would you do this? Preferable in mysql without
coldfusion... But if that¹s not possible, a coldfusion solution will do
fine.

Thanks,
Ryan
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: copy record in mysql

2003-12-08 Thread Deanna Schneider
Um, you mean:
Insert into mytable
select * from mytable where someclause that gets your old column?

- Original Message - 
From: Ryan Mitchell [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, December 08, 2003 7:53 AM
Subject: OT: copy record in mysql

Hello

I google'd this but couldn¹t get an answer.

I have a table with lots of columns of different types. I need to copy a row
to a new row... How would you do this? Preferable in mysql without
coldfusion... But if that¹s not possible, a coldfusion solution will do
fine.

Thanks,
Ryan
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: copy record in mysql

2003-12-08 Thread Ryan Mitchell
Mysql syntax says you cant insert into the table you select from, unless I
read it wrong.

On 8/12/03 2:00 pm, Deanna Schneider [EMAIL PROTECTED]
wrote:

 Um, you mean:
 Insert into mytable
 select * from mytable where someclause that gets your old column?
 
 - Original Message -
 From: Ryan Mitchell [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Monday, December 08, 2003 7:53 AM
 Subject: OT: copy record in mysql
 
 Hello
 
 I google'd this but couldn¹t get an answer.
 
 I have a table with lots of columns of different types. I need to copy a row
 to a new row... How would you do this? Preferable in mysql without
 coldfusion... But if that¹s not possible, a coldfusion solution will do
 fine.
 
 Thanks,
 Ryan
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: copy record in mysql

2003-12-08 Thread Deanna Schneider
Oh. Never mind. (I don't use MySql and figured maybe you just were a sql
newbie. :) )

-Deanna

- Original Message - 
From: Ryan Mitchell [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, December 08, 2003 8:05 AM
Subject: Re: copy record in mysql

Mysql syntax says you cant insert into the table you select from, unless I
read it wrong.

On 8/12/03 2:00 pm, Deanna Schneider [EMAIL PROTECTED]
wrote:

 Um, you mean:
 Insert into mytable
 select * from mytable where someclause that gets your old column?

 - Original Message -
 From: Ryan Mitchell [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Monday, December 08, 2003 7:53 AM
 Subject: OT: copy record in mysql

 Hello

 I google'd this but couldn¹t get an answer.

 I have a table with lots of columns of different types. I need to copy a
row
 to a new row... How would you do this? Preferable in mysql without
 coldfusion... But if that¹s not possible, a coldfusion solution will do
 fine.

 Thanks,
 Ryan


 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: copy record in mysql

2003-12-08 Thread Ryan Mitchell
No probs, thanks anyways...
Any other takers?

On 8/12/03 2:57 pm, Deanna Schneider [EMAIL PROTECTED]
wrote:

 Oh. Never mind. (I don't use MySql and figured maybe you just were a sql
 newbie. :) )
 
 -Deanna
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: copy record in mysql

2003-12-08 Thread Philip Arnold
 Mysql syntax says you cant insert into the table you select
 from, unless I read it wrong.

INSERT INTO
SELECT FROM

Should work, but we don't use mySQL, so I can't guarantee it

Can you create a View of the table, and then insert from that?
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]