Page 1 of 1

Export Field for all lists MySQL

PostPosted: Sat Nov 17, 2012 3:07 pm
by alo
Good Afternoon,

Not sure if this is a question that can be answered here, or more of a mySQL question, but I was looking for a way to export a specific field from all leads in my system from all lists. For Example I need to export all the vin numbers into a single file.

I have figured out how to do it one list/table at a time using:

mysql> select Vin INTO OUTFILE '/var/NameOfFile.txt' FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n' FROM custom_102313;

But I have tried everything I can think of to do it by all lists/tables. Like I was thinking FROM * or FROM custom_* or something.

If anybody has any suggestions, I would really appreciate it.

Thanks for everything.

mySQL
Server version: 5.1.57-log SUSE MySQL RPM
Using:
VERSION: 2.4-357a
BUILD: 120125-2107
system settings:
Version: 2.4b0.5
DB Schema Version: 1312
Vicibox 64bit 3.1.15

Re: Export Field for all lists MySQL

PostPosted: Sat Nov 17, 2012 6:07 pm
by williamconley
you want the union command on the mysql dev site.

otherwise you could create a new table to hold all the records ... wipe it clean, copy into it from all the individual tables and then export from it when you have them all.

Re: Export Field for all lists MySQL

PostPosted: Sun Nov 18, 2012 1:24 am
by alo
Thanks for the quick reply!

I am not sure that's what I am looking for, or perhaps I Am just not doing it right.

Just to put it in perspective and clarify,

I am looking to export the data in a specific Fields/column, to provide to my lead provider, so they can scrub the list before sending me one. (that way I can make sure I don't pay for duplicates)

I do want to keep the data in the lists unaffected. so Basically, its a report of the Vin numbers(custom Field) for all my leads in the system into a text file.

Thanks again for any advice. :)

Re: Export Field for all lists MySQL

PostPosted: Sun Nov 18, 2012 1:59 pm
by williamconley
either method (union or temp table) will create a list you can export without affecting the existing data.