View Single Post

  #3 (permalink)  
Old 11-09-2007
zoot
 
Posts: n/a
Default Re: Loading a tabel with extract from another tabbe!?

On 9 nov, 16:23, Captain Paralytic <paul_laut...@yahoo.com> wrote:
> On 9 Nov, 14:40, zoot <a...@swing.be> wrote:
>
>
>
> > I would like to extract a list of entries from on table (t1 ) based on
> > a field TIMESTAMP to a file reayd to be loaded into another database.
> > Say something like
> > select * into dumpfile entries from t1 where date like
> > '2007-11-09%' ( so extract all from table t1 done today )

>
> > on the other database I would like to

>
> > mysql -p < entries ( maybe either edit the file to specify the
> > databae /table or maybe some options )

>
> > from select * into dumpfile I got an error 'multiple row '
> > If I do a select * into outfile I have a file with every needed
> > entries But the format doesn't allo a reload!
> > Any idea ?
> > Many thanks in advance for your time.
> > Zoot

>
> Look at the parameters for mysqldump. You can offer it a query


Many thanks, But I should have better read the F..g manual.
The intersssting part is the 'LOAD DATA INFILE '/usr/mysql/temp/
blblab' INTO TABLE xyz;

it take data ( in file ) created from a SELECT * INTO OUTFILE '/usr/
mysql/temp/blblab' from TABLE xyz;
as easy as that!
Many thanks again
Zoot

Reply With Quote