RE: dumping between tables?

2002-02-12 Thread Alain Fontaine - Consultant and developer

Paul,

RTFM : http://www.mysql.com/doc/I/N/INSERT_SELECT.html

[quote]
INSERT [LOW_PRIORITY] [IGNORE] [INTO] tbl_name [(column list)] SELECT ...

With INSERT ... SELECT statement you can quickly insert many rows into a
table from one or many tables.

INSERT INTO tblTemp2 (fldID) SELECT tblTemp1.fldOrder_ID FROM tblTemp1 WHERE
tblTemp1.fldOrder_ID  100;

-
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




RE: dumping between tables?

2002-02-12 Thread Alain Fontaine - Consultant and developer

Hello Paul,

Why don't you just use mysqldump to dump the data to a textfile, and then
insert the data from the textfile into your new table?

---
Alain Fontaine
Consultant  Developer
VAlain S.A.
Tel: +32-4-2522950
---

-Original Message-
From: Paul Reilly [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 1:20 PM
To: [EMAIL PROTECTED]
Subject: dumping between tables?


 Re: sql query

 Hi,

 I want to dump the contents of one table in to another table
 which has the same structure in MySQL, with just one column type changed
 from VARCHAR to TEXT. Whats the best way to do this?

 Paul



-
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


-
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


-
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




Re: dumping between tables?

2002-02-12 Thread Paul Reilly


   I want to dump the contents of one table in to another table
   which has the same structure in MySQL, with just one column type changed
   from VARCHAR to TEXT. Whats the best way to do this?


 Would INSERT...SELECT suit you?
 =dn



Yes, but it's a big table. Is there a way to do this nicely? ie, something
like

SELECT * from table1 | INSERT - INTO table2

??

I was considerign using mysqldump, but I only want to reload one table in
a database, and I'm not sure the mysqldump syntax for specific tables.

Thanks

Paul


-
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


-
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




Re: dumping between tables?

2002-02-12 Thread DL Neil

Hi Paul,
 
  I want to dump the contents of one table in to another table
  which has the same structure in MySQL, with just one column type changed
  from VARCHAR to TEXT. Whats the best way to do this?


Would INSERT...SELECT suit you?
=dn



-
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


-
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




Re: dumping between tables?

2002-02-12 Thread DL Neil

Paul,

I want to dump the contents of one table in to another table
which has the same structure in MySQL, with just one column type changed
from VARCHAR to TEXT. Whats the best way to do this?
 
  Would INSERT...SELECT suit you?

 Yes, but it's a big table. Is there a way to do this nicely? ie, something
 like

 SELECT * from table1 | INSERT - INTO table2

=I'm sorry I don't understand nicely (but see below) - you can do a SELECT INTO 
OUTFILE, if you prefer to do
it in two steps.

 I was considerign using mysqldump, but I only want to reload one table in
 a database, and I'm not sure the mysqldump syntax for specific tables.

If you are not happy/familiar with native SQL or the MySQL tools, then I recommend an 
SQL admin/mgmt package
like MySQL-Front (www.mysql-front.de IIRC) which will allow you to do/see things in 
'prototype' mode, ie 'I want
to see it as it happens...'. It also features an export facility (tbl defns and/or tbl 
contents - into 'dump
format') which I use ALL the time.

Regards,
=dn




-
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


-
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




Re: dumping between tables?

2002-02-12 Thread Cary

Not only will mysqldump allow you to work on a specific table, but it will 
also allow you to dump directly from one table into another. Sounds like 
exactly what your looking for.
You'll need to use the correct syntax to keep it from adding CREATE TABLE 
statements, but it's all clear on this page.
http://www.mysql.com/doc/m/y/mysqldump.html

Cary

query


I was considerign using mysqldump, but I only want to reload one table in
a database, and I'm not sure the mysqldump syntax for specific tables.

Thanks

Paul


-
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


-
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




RE: dumping between tables?

2002-02-07 Thread Alain Fontaine - Consultant and developer

Hello Paul,

Why don't you just use mysqldump to dump the data to a textfile, and then
insert the data from the textfile into your new table?

---
Alain Fontaine
Consultant  Developer
VAlain S.A.
Tel: +32-4-2522950
---

-Original Message-
From: Paul Reilly [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 1:20 PM
To: [EMAIL PROTECTED]
Subject: dumping between tables?


 Re: sql query

 Hi,

 I want to dump the contents of one table in to another table
 which has the same structure in MySQL, with just one column type changed
 from VARCHAR to TEXT. Whats the best way to do this?

 Paul



-
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


-
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




Re: dumping between tables?

2002-02-07 Thread DL Neil

Hi Paul,
 
  I want to dump the contents of one table in to another table
  which has the same structure in MySQL, with just one column type changed
  from VARCHAR to TEXT. Whats the best way to do this?


Would INSERT...SELECT suit you?
=dn



-
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




Re: dumping between tables?

2002-02-07 Thread Paul Reilly


   I want to dump the contents of one table in to another table
   which has the same structure in MySQL, with just one column type changed
   from VARCHAR to TEXT. Whats the best way to do this?


 Would INSERT...SELECT suit you?
 =dn



Yes, but it's a big table. Is there a way to do this nicely? ie, something
like

SELECT * from table1 | INSERT - INTO table2

??

I was considerign using mysqldump, but I only want to reload one table in
a database, and I'm not sure the mysqldump syntax for specific tables.

Thanks

Paul


-
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




RE: dumping between tables?

2002-02-07 Thread Alain Fontaine - Consultant and developer

Paul,

RTFM : http://www.mysql.com/doc/I/N/INSERT_SELECT.html

[quote]
INSERT [LOW_PRIORITY] [IGNORE] [INTO] tbl_name [(column list)] SELECT ...

With INSERT ... SELECT statement you can quickly insert many rows into a
table from one or many tables.

INSERT INTO tblTemp2 (fldID) SELECT tblTemp1.fldOrder_ID FROM tblTemp1 WHERE
tblTemp1.fldOrder_ID  100;
.
.
[/quote]

---
Alain Fontaine
Consultant  Developer
VAlain S.A.
Tel: +32-4-2522950
---

-Original Message-
From: Paul Reilly [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 1:54 PM
To: [EMAIL PROTECTED]
Subject: Re: dumping between tables?



   I want to dump the contents of one table in to another table
   which has the same structure in MySQL, with just one column type
changed
   from VARCHAR to TEXT. Whats the best way to do this?


 Would INSERT...SELECT suit you?
 =dn



Yes, but it's a big table. Is there a way to do this nicely? ie, something
like

SELECT * from table1 | INSERT - INTO table2

??

I was considerign using mysqldump, but I only want to reload one table in
a database, and I'm not sure the mysqldump syntax for specific tables.

Thanks

Paul


-
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


-
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




Re: dumping between tables?

2002-02-07 Thread Cary

Not only will mysqldump allow you to work on a specific table, but it will 
also allow you to dump directly from one table into another. Sounds like 
exactly what your looking for.
You'll need to use the correct syntax to keep it from adding CREATE TABLE 
statements, but it's all clear on this page.
http://www.mysql.com/doc/m/y/mysqldump.html

Cary

query


I was considerign using mysqldump, but I only want to reload one table in
a database, and I'm not sure the mysqldump syntax for specific tables.

Thanks

Paul


-
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




Re: dumping between tables?

2002-02-07 Thread DL Neil

Paul,

I want to dump the contents of one table in to another table
which has the same structure in MySQL, with just one column type changed
from VARCHAR to TEXT. Whats the best way to do this?
 
  Would INSERT...SELECT suit you?

 Yes, but it's a big table. Is there a way to do this nicely? ie, something
 like

 SELECT * from table1 | INSERT - INTO table2

=I'm sorry I don't understand nicely (but see below) - you can do a SELECT INTO 
OUTFILE, if you prefer to do
it in two steps.

 I was considerign using mysqldump, but I only want to reload one table in
 a database, and I'm not sure the mysqldump syntax for specific tables.

If you are not happy/familiar with native SQL or the MySQL tools, then I recommend an 
SQL admin/mgmt package
like MySQL-Front (www.mysql-front.de IIRC) which will allow you to do/see things in 
'prototype' mode, ie 'I want
to see it as it happens...'. It also features an export facility (tbl defns and/or tbl 
contents - into 'dump
format') which I use ALL the time.

Regards,
=dn




-
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