Solved

MYSQL join and export to CSV

Posted on 2015-02-05
2
112 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
[MYSQL]: Delete is very slow 4 95
join tables 4 56
Amazon Redshift 2 39
sort in mysql based off of query param 4 26
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

820 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