Solved

MYSQL join and export to CSV

Posted on 2015-02-05
2
110 Views
Last Modified: 2015-02-06
Apologies I know this is simple for people but I have tried lots of different ways and failed.

I need to export

I am using SQL workbench and I need to export to a CSV file all the emails in the "em_subscriber" table that have a status=3 in the "em_subscriber_list".  Obviously its the "subscriberid" and "id" fields which are the unique identifier so I need a statement that will join the 2.

em_subscriber_list
subscriberid
status


em_subscriber
email
id


Can anyone help me
0
Comment
Question by:ncomper
2 Comments
 
LVL 11

Accepted Solution

by:
N R earned 500 total points
ID: 40592966
select *
from em_subscriber es
inner join em_subscriber_list esl on es.id = esl.subscriberid
where status = 3

Open in new window

0
 
LVL 5

Author Closing Comment

by:ncomper
ID: 40593397
perfect
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Php  POSTGRES  "  IN SIDE "  " 4 78
simple mysql statement 3 39
CheckListBox usage 3 59
Select Query - Group By Function Producing Unexpected Results 8 20
A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question