Export Field for all lists MySQL

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Export Field for all lists MySQL

Postby alo » Sat Nov 17, 2012 3:07 pm

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
alo
 
Posts: 197
Joined: Wed Jun 20, 2012 10:21 am

Re: Export Field for all lists MySQL

Postby williamconley » Sat Nov 17, 2012 6:07 pm

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.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Export Field for all lists MySQL

Postby alo » Sun Nov 18, 2012 1:24 am

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. :)
alo
 
Posts: 197
Joined: Wed Jun 20, 2012 10:21 am

Re: Export Field for all lists MySQL

Postby williamconley » Sun Nov 18, 2012 1:59 pm

either method (union or temp table) will create a list you can export without affecting the existing data.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 96 guests