Link to home
Start Free TrialLog in
Avatar of sandshakimi
sandshakimiFlag for United States of America

asked on

How to Formulate SQL Query from List in Excel?

I've got a list of 100 email addresses.

Need to query against the User table in MySQL, and return their records.

For single query, it's simple.

SELECT *
FROM `users`
WHERE `mail` LIKE 'a.d.vent.kx.mm@gmail.com'
LIMIT 0 , 30

Then I'm printing to PDF for reporting.

How can I expedite this with a hundred emails, than just kick out a single PDF with all hundred records?

My list is in a single column in an Excel file.
Avatar of JimFive
JimFive
Flag of United States of America image

Bring the list into a temporary table in mySQL and then query:
SELECT *
FROM Users
INNER JOIN tmpList
ON Users.Mail = tmpList.Mail

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of John_Vidmar
John_Vidmar
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial