I've tried about 20 different variations with no luck
except when i modify the where statement to use only
one table. Then it works fine but it's not the results
i want. I was suspecting exactly what you said: you
can only refer to one table, and the first one you
specify at that. I was trying to avoid creating a temp
table and all that as this is a dump that i'll have to
do a lot. Just thinking off the top of my head: I
could probably write a batch file that executes the
necessary commands to create the temp table, dump the
contents, and then remove the temp table. I'll see if
it works.

Thanks, Rhino.

-dan

-----Original Message-----
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 09, 2004 5:58 PM
To: [EMAIL PROTECTED]
Subject: Re: mysqldump JOIN?


According to the mysqldump article in the manual -
http://www.mysql.com/doc/en/mysqldump.html -
you can select specific rows to dump with the --where
or -w options. I've
never tried making the where clause refer to a
different table; I suspect
from the examples given that you can only refer to the
same table. If you
haven't given it a try yet, try it now and see if it
works.

If you have tried it and it doesn't accept a --where
that refers to a second
table, you could try creating a temporary table,
copying the desired rows
into it, then doing mysqldump on the temporary table.

I can't promise this will work but it should be easy
enough to try.

Rhino

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 09, 2004 6:15 PM
Subject: mysqldump JOIN?


> I would like to do the following:
>
> mysqldump -w "users.user_id=enews.user_id" sotx
users
> > c:/enews_users.sql
>
> Ideally this would dump all records in table users
> where the user_id field value is also present in the
> enews table. Is this possible?
>
> TIA,
>
> Dan
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
http://lists.mysql.com/[EMAIL PROTECTED]
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to