Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MYSQL join and export to CSV

Posted on 2015-02-05
2
Medium Priority
?
120 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 12

Accepted Solution

by:
Nathan Riley earned 2000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

963 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