• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 126
  • Last Modified:

MYSQL join and export to CSV

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
ncomper
Asked:
ncomper
1 Solution
 
Nathan RileyFounderCommented:
select *
from em_subscriber es
inner join em_subscriber_list esl on es.id = esl.subscriberid
where status = 3

Open in new window

0
 
ncomperAuthor Commented:
perfect
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now